Scripting with two imaging cameras

Discussion in 'Scripting and Programming' started by DaveLane, Sep 7, 2016.

  1. DaveLane

    DaveLane Cyanogen Customer

    Joined:
    Sep 6, 2016
    Messages:
    33
    Location:
    Halifax, NS
    If I configure two cameras in the Camera Control window, and wish to use Camera 2 for imaging, how to access camera 2 from scripting and get access to all the method and property control that I would have for the "default" camera 1?

    Dave
     
  2. Colin Haig

    Colin Haig Staff Member

    Joined:
    Oct 27, 2014
    Messages:
    3,596
    Hi Dave, I think Camera2 is accessed differently, as CCDCamera.Guiderxxxxx where xxxxx is the set of actions/properties that you want to do. e.g. CCDCamera.GuiderTemperatureSetPoint(-20.0)
    Its around page 550 in the PDF manual for MDL 6.x
    I don't think MDL's object model is a multi-camera model, e.g. you couldn't create 2 CCDCamera objects, one for Camera1 and one for Camera2.
    I might be wrong about this, but its one of the limitations.
    Am curious what you are up to ;-)
     
  3. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    6,982
    Colin is correct.
     
  4. DaveLane

    DaveLane Cyanogen Customer

    Joined:
    Sep 6, 2016
    Messages:
    33
    Location:
    Halifax, NS
    Thanks Doug and Colin. That's too bad as while the Guiderxxxx properties/methods allow you to control most aspects of the 2nd camera, correct me if I'm wrong, but I assume it can't control a second filter wheel (one in front of the Camera 2 vs. the one in front of Camera 1)?

    Colin: I was hoping to control robotically two cameras with different properties. I have an Optec 4-port selector on the main scope, but it could also be used with a camera on a piggybacked scope. Mainly, I want a spare camera, but if I am going to buy a second camera I want something that can take shorter exposures than our Apogee CG16M.

    --- Dave
     
  5. Colin Haig

    Colin Haig Staff Member

    Joined:
    Oct 27, 2014
    Messages:
    3,596
    Yes it can, just there is a typo about the guider filter wheel which I spotted the other day when answering your question. CCDCamera.GuiderFilterWheel is what you want.
     
  6. DaveLane

    DaveLane Cyanogen Customer

    Joined:
    Sep 6, 2016
    Messages:
    33
    Location:
    Halifax, NS
    OK. I now see that property in the help file (missed it previously). Is the typo you refer to the missing filter parameter for CCDCamera.GuiderExpose?

    And finally is there a guider equivalent to Application.CalSet (et al) and CCDCamera.Calibrate (to calibrate just taken image)? I use these now just for resync image and focus test frames.
     
  7. Colin Haig

    Colin Haig Staff Member

    Joined:
    Oct 27, 2014
    Messages:
    3,596
  8. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    6,982
    You can get a document object for the guider image, then calibrate or whatever.
     
  9. DaveLane

    DaveLane Cyanogen Customer

    Joined:
    Sep 6, 2016
    Messages:
    33
    Location:
    Halifax, NS
    So, CCDCamera.Document is the last exposure,regardless of whether that image was a main camera or guider camera exposure?
     
  10. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    6,982
    No, that's always the main camera image.

    The trick is to get Application.Documents, and then look for the one called "Autoguider Image". The same image buffer is reused over and over again, so you don't have to keep looking for it.
     
  11. DaveLane

    DaveLane Cyanogen Customer

    Joined:
    Sep 6, 2016
    Messages:
    33
    Location:
    Halifax, NS
    Thanks Doug.
     

Share This Page