Scripting a file conversion to .FITS

Discussion in 'Scripting and Programming' started by David F. Emery, Mar 30, 2015.

  1. David F. Emery

    David F. Emery Cyanogen Customer

    Joined:
    Mar 30, 2015
    Messages:
    7
    I would like to use MaxIm DL scripting to open a previously-saved .bmp or .jpg image and save it as a .FITS image that can be plate-solved. Then I need to add the date-time information to the .FITS header. I will then use PinPoint scripting to solve the image in the usual manner. This procedure works perfectly when I do it manually with MaxIm DL, but I need to do this in a .NET program. I have looked over the available CCDcamera and Document scripts, but I cannot see exactly how to accomplish this since the file I need to save as a .FITS has been previously saved and the camera is not currently active. How do I go about this? Once I see how to open and convert the file, I ought to be able to figure out the rest.
    Thanks,
    David Emery
     
  2. Bob Denny

    Bob Denny Cyanogen Customer

    Joined:
    Oct 12, 2014
    Messages:
    723
    Location:
    DC-3 Dreams, SP, Mesa, Arizona +1 480 396 9700
    On our forum system, David and I corresponded and he now has a good solutionto the actual problem he is trying to solve.
     
  3. David F. Emery

    David F. Emery Cyanogen Customer

    Joined:
    Mar 30, 2015
    Messages:
    7
    Bob's solution is indeed very helpful and I appreciate his extremely rapid response to my question regarding PinPoint scripting. Nevertheless I would like to know if it is possible - and learn how -- to write a MaxImDL script that will read a .bmp or .jpg file and save it as a .FITS file.
    Thanks,
    Dave Emery
     
  4. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    6,182
    Document.OpenFile
    Document.SaveFile
     
  5. David F. Emery

    David F. Emery Cyanogen Customer

    Joined:
    Mar 30, 2015
    Messages:
    7
    Got it. Thanks.
     
  6. Bob Denny

    Bob Denny Cyanogen Customer

    Joined:
    Oct 12, 2014
    Messages:
    723
    Location:
    DC-3 Dreams, SP, Mesa, Arizona +1 480 396 9700
    Yeah Doug, I pointed him to the MaxIm scripting docs over on our forum too, with reference to those two methods and that SaveFile does all sorts of conversions.
     

Share This Page