diff --git a/andor/andor.tcl b/andor/andor.tcl index 68a2ebd1..7fb8c2bc 100644 --- a/andor/andor.tcl +++ b/andor/andor.tcl @@ -324,10 +324,10 @@ global STATUS ANDOR_CFG set ANDOR_CFG(kineticMode) 1 setKineticMode .lowlevel.datarate configure -text "" - andorset vspeed red VSSpeed 0 - andorset emhs red EMHSSpeed 0 - andorset vspeed blue VSSpeed 0 - andorset emhs blue EMHSSpeed 0 +# andorset vspeed red VSSpeed 0 +# andorset emhs red EMHSSpeed 0 +# andorset vspeed blue VSSpeed 0 +# andorset emhs blue EMHSSpeed 0 speckleshutter red open speckleshutter blue open fastvideomode @@ -359,7 +359,7 @@ global ANDOR_CCD ANDOR_EMCCD mimicMode blue temp "[format %5.1f [lindex $bluetemp 0]] degC" .main.rcamtemp configure -text "[format %5.1f [lindex $redtemp 0]] degC" .main.bcamtemp configure -text "[format %5.1f [lindex $bluetemp 0]] degC" - set perrun [expr int(100 / ($CAMSTATUS(blue,TKinetics) / 0.04))] + set perrun [expr int(100 / ($CAMSTATUS(blue,TKinetics) / $SCOPE(exposure))] if { $perrun > 100 } {set perrun 100} if { $perrun < 20 } {set perrun 20} commandAndor red "numberkinetics $perrun" diff --git a/andor/andorCameraServer.tcl b/andor/andorCameraServer.tcl index 3c18cb2e..23cf8143 100755 --- a/andor/andorCameraServer.tcl +++ b/andor/andorCameraServer.tcl @@ -39,8 +39,9 @@ proc debuglog { msg } { proc cAndorSetProperty { cam prop val {val2 ""} } { global ANDOR_CFG ANDOR_ARM if { $prop == "HSSpeed" } { - if { $val == 0 } { set res [andorSetProperty $cam HSSpeed 0 $val2] ; set prop EMHSSpeed ; set val $val2} - if { $val == 1 } { set res [andorSetProperty $cam HSSpeed 1 $val2] ; set val $val2} + if { $val == 0 } { set res [andorSetProperty $cam HSSpeed 0 $val2] ; set prop EMHSSpeed} + if { $val == 1 } { set res [andorSetProperty $cam HSSpeed 1 $val2]} + set val $val2 } else { set res [andorSetProperty $cam $prop $val] } @@ -131,11 +132,11 @@ set ANDOR_CFG(fitds9) 0 set ANDOR_CFG($CAM,OutputAmplifier) 1 set ANDOR_CFG($CAM,PreAmpGain) 1 set ANDOR_CFG($CAM,VSSpeed) 1 -set ANDOR_CFG($CAM,HSSpeed) 1 +set ANDOR_CFG($CAM,HSSpeed) 0 set ANDOR_CFG($CAM,EMHSSpeed) 1 set ANDOR_CFG($CAM,hbin) 1 set ANDOR_CFG($CAM,vbin) 1 -set ANDOR_CFG(configure) "1 1 1 1024 1 1024 1 1 1 1" +set ANDOR_CFG(configure) "1 1 1 1024 1 1024 1 1 0 1" andorConfigure $CAM 1 1 1 1024 1 1024 $ANDOR_CFG($CAM,PreAmpGain) $ANDOR_CFG($CAM,VSSpeed) $ANDOR_CFG($CAM,HSSpeed) $ANDOR_CFG($CAM,EMHSSpeed) debuglog "Configured camera id $CAM for ccd mode" @@ -193,8 +194,8 @@ cAndorSetProperty $CAM EMCCDGain 1 cAndorSetProperty $CAM VSSpeed 1 #cAndorSetProperty $CAM VSAmplitude 0 cAndorSetProperty $CAM BaselineClamp 1 -cAndorSetProperty $CAM PreAmpGain 1 -cAndorSetProperty $CAM HSSpeed 1 1 +cAndorSetProperty $CAM PreAmpGain 0 +cAndorSetProperty $CAM HSSpeed 1 0 cAndorSetProperty $CAM HSSpeed 0 1 cAndorSetProperty $CAM ReadMode 4 cAndorSetProperty $CAM KineticCycleTime 0.0 @@ -279,25 +280,36 @@ global CAM ANDOR_CFG # SCOPE - Array of telescope settings # proc configureFrame { mode } { -global CAM ANDOR_ROI ANDOR_CFG SCOPE +global CAM ANDOR_ROI ANDOR_CFG SCOPE TELEMETRY if { $mode == "fullframe" } { debuglog "Configure camera $CAM for fullframe" andorConfigure $CAM $ANDOR_CFG($CAM,hbin) $ANDOR_CFG($CAM,vbin) 1 1024 1 1024 $ANDOR_CFG($CAM,PreAmpGain) $ANDOR_CFG($CAM,VSSpeed) $ANDOR_CFG($CAM,HSSpeed) $ANDOR_CFG($CAM,EMHSSpeed) cAndorSetProperty $CAM AcquisitionMode 1 - cAndorSetProperty $CAM OutputAmplifier 0 + set TELEMETRY(speckle.andor.kinetic_mode) 0 +# cAndorSetProperty $CAM OutputAmplifier 0 set SCOPE(numframes) 1 } if { $mode == "roi" } { debuglog "Configure camera $CAM for ROI : $ANDOR_ROI(xs) $ANDOR_ROI(xe) $ANDOR_ROI(ys) $ANDOR_ROI(ye)" andorConfigure $CAM $ANDOR_CFG($CAM,hbin) $ANDOR_CFG($CAM,vbin) $ANDOR_ROI(xs) $ANDOR_ROI(xe) $ANDOR_ROI(ys) $ANDOR_ROI(ye) $ANDOR_CFG($CAM,PreAmpGain) $ANDOR_CFG($CAM,VSSpeed) $ANDOR_CFG($CAM,HSSpeed) $ANDOR_CFG($CAM,EMHSSpeed) - cAndorSetProperty $CAM AcquisitionMode 3 - cAndorSetProperty $CAM OutputAmplifier 0 + set TELEMETRY(speckle.andor.kinetic_mode) 1 + if { $ANDOR_CFG($CAM,NumberAccumulations) > 1 } { + cAndorSetProperty $CAM AcquisitionMode 2 + } else { + cAndorSetProperty $CAM AcquisitionMode 3 + } +# cAndorSetProperty $CAM OutputAmplifier 0 } if { $mode == "fullkinetic" } { debuglog "Configure camera $CAM for fullframe" andorConfigure $CAM $ANDOR_CFG($CAM,hbin) $ANDOR_CFG($CAM,vbin) 1 1024 1 1024 $ANDOR_CFG($CAM,PreAmpGain) $ANDOR_CFG($CAM,VSSpeed) $ANDOR_CFG($CAM,HSSpeed) $ANDOR_CFG($CAM,EMHSSpeed) - cAndorSetProperty $CAM AcquisitionMode 3 - cAndorSetProperty $CAM OutputAmplifier 0 + set TELEMETRY(speckle.andor.kinetic_mode) 1 + if { $ANDOR_CFG($CAM,NumberAccumulations) > 1 } { + cAndorSetProperty $CAM AcquisitionMode 2 + } else { + cAndorSetProperty $CAM AcquisitionMode 3 + } +# cAndorSetProperty $CAM OutputAmplifier 0 } } @@ -678,10 +690,10 @@ global ANDOR_CCD ANDOR_EMCCD ANDOR_CODE CAM } } switch vsspeed { - 4.33usec { set res [cAndorSetProperty $CAM VSSpeed 0] ; if { $res != $ANDOR_CODE(DRV_SUCCESS) } {return $res} } - 2.2usec { set res [cAndorSetProperty $CAM VSSpeed 1] ; if { $res != $ANDOR_CODE(DRV_SUCCESS) } {return $res} } + 4.33usec { set res [cAndorSetProperty $CAM VSSpeed 4] ; if { $res != $ANDOR_CODE(DRV_SUCCESS) } {return $res} } + 2.2usec { set res [cAndorSetProperty $CAM VSSpeed 3] ; if { $res != $ANDOR_CODE(DRV_SUCCESS) } {return $res} } 1.13usec { set res [cAndorSetProperty $CAM VSSpeed 2] ; if { $res != $ANDOR_CODE(DRV_SUCCESS) } {return $res} } - 0.6usec { set res [cAndorSetProperty $CAM VSSpeed 3] ; if { $res != $ANDOR_CODE(DRV_SUCCESS) } {return $res} } + 0.6usec { set res [cAndorSetProperty $CAM VSSpeed 1] ; if { $res != $ANDOR_CODE(DRV_SUCCESS) } {return $res} } } switch vsamplitude { normal { set res [cAndorSetProperty $CAM VSAmplitude 0] ; if { $res != $ANDOR_CODE(DRV_SUCCESS) } {return $res} } @@ -880,6 +892,7 @@ global SCOPE CAM ANDOR_ARM ANDOR_CFG TELEMETRY SPECKLE_DATADIR FITSBITS scalepeak { set ANDOR_CFG(scalepeak) [lindex $msg 1] ; puts $sock "OK"} fitsbits { set ANDOR_CFG(fitsbits) $FITSBITS([lindex $msg 1]) ; puts $sock "OK"} whicharm { puts $sock $ANDOR_ARM } + gettimings { set it [andorGetProperty $CAM timings] ; puts $sock $it } forceroi { forceROI [lindex $msg 1] [lindex $msg 2] [lindex $msg 3] [lindex $msg 4] ; puts $sock "OK"} locatestar { puts $sock "[locateStar [lindex $msg 1] [lindex $msg 2]]" } datadir { set SPECKLE_DATADIR [lindex $msg 1] ; puts $sock "OK"} @@ -900,7 +913,7 @@ global SCOPE CAM ANDOR_ARM ANDOR_CFG TELEMETRY SPECKLE_DATADIR FITSBITS readmode { set it [cAndorSetProperty $CAM ReadMode [lindex $msg 1]] ; puts $sock $it} acquisition { set it [cAndorSetProperty $CAM AcquisitionMode [lindex $msg 1]] ; puts $sock $it} kineticcycletime { set it [cAndorSetProperty $CAM KineticCycleTime [lindex $msg 1]] ; puts $sock $it} - numberaccumulations { set it [cAndorSetProperty $CAM NumberAccumulations [lindex $msg 1]] ; puts $sock $it} + numberaccumulations { set it [cAndorSetProperty $CAM NumberAccumulations [lindex $msg 1]] ; puts $sock $it} numberkinetics { set it [cAndorSetProperty $CAM NumberKinetics [lindex $msg 1]] ; puts $sock $it} accumulationcycletime { set it [cAndorSetProperty $CAM AccumulationCycleTime [lindex $msg 1]] ; puts $sock $it} setexposure { SetExposureTime [lindex $msg 1] ; puts $sock "OK"} @@ -934,7 +947,6 @@ global SCOPE CAM ANDOR_ARM ANDOR_CFG TELEMETRY SPECKLE_DATADIR FITSBITS andorConfigure $CAM $ANDOR_CFG($CAM,hbin) $ANDOR_CFG($CAM,vbin) $ANDOR_ROI(xs) $ANDOR_ROI(xe) $ANDOR_ROI(ys) $ANDOR_ROI(ye) $ANDOR_CFG($CAM,PreAmpGain) $ANDOR_CFG($CAM,VSSpeed) $ANDOR_CFG($CAM,HSSpeed) $ANDOR_CFG($CAM,EMHSSpeed) puts $sock "OK" } - setupcamera { set it [andorSetupCamera $CAM [lindex $msg 1]] ; puts $sock $it} default { if { [string range [lindex $msg 0] 0 2] == "Get" } { puts $sock [eval [lindex $msg 0]] } else { diff --git a/andor/andor_tcl.c b/andor/andor_tcl.c index fb95b5af..3722d67e 100644 --- a/andor/andor_tcl.c +++ b/andor/andor_tcl.c @@ -2851,11 +2851,11 @@ int tcl_andorConfigure(ClientData clientData, Tcl_Interp *interp, int argc, char return TCL_ERROR; } +/* status = GetDetector(&andorSetup[cameraId].width, &andorSetup[cameraId].height); status = GetTemperatureRange(&andorSetup[cameraId].minimum_temperature, &andorSetup[cameraId].maximum_temperature); status = GetNumberPreAmpGains(&andorSetup[cameraId].num_preamp_gains); status = GetNumberVSSpeeds(&andorSetup[cameraId].num_vertical_speeds); -/* for(j = 0; j < ANDOR_NUM_AMPLIFIERS; j++) { status = GetNumberHSSpeeds(0, j, &andorSetup[cameraId].num_horizontal_speeds[j]); num_hspeeds = andorSetup[cameraId].num_horizontal_speeds[j]; @@ -2863,13 +2863,13 @@ int tcl_andorConfigure(ClientData clientData, Tcl_Interp *interp, int argc, char andor_get_horizontal_speed(j, i, &fspeed); } } - */ status = GetEMGainRange(&andorSetup[cameraId].minimum_em_gain, &andorSetup[cameraId].maximum_em_gain); status = GetNumberADChannels(&num_ad); - andorSetup[cameraId].amplifier = DFT_ANDOR_AMPLIFIER; andorSetup[cameraId].em_gain = DFT_ANDOR_EM_GAIN; andorSetup[cameraId].em_advanced = DFT_ANDOR_EM_ADVANCED; + */ + andorSetup[cameraId].horizontal_speed_index[ANDOR_CCD] = ccd_horizontal_speed; andorSetup[cameraId].horizontal_speed_index[ANDOR_EMCCD] = em_horizontal_speed; andorSetup[cameraId].vertical_speed_index = vertical_speed; @@ -2887,11 +2887,6 @@ int tcl_andorConfigure(ClientData clientData, Tcl_Interp *interp, int argc, char status = SetImage(andorSetup[cameraId].image.hbin,andorSetup[cameraId].image.vbin,andorSetup[cameraId].image.hstart,andorSetup[cameraId].image.hend,andorSetup[cameraId].image.vstart,andorSetup[cameraId].image.vend); printf("status = %d in tcl_andorConfigure, %d,%d,%d,%d,%d,%d\n",status,andorSetup[cameraId].image.hbin,andorSetup[cameraId].image.vbin,andorSetup[cameraId].image.hstart,andorSetup[cameraId].image.hend,andorSetup[cameraId].image.vstart,andorSetup[cameraId].image.vend); -// status = andor_set_temperature(DFT_ANDOR_TEMPERATURE); -// status = andor_cooler_off(); -// andor_setup_camera - - return TCL_OK; } diff --git a/filtersConfiguration b/filtersConfiguration index 4d24952e..075c5f62 100644 --- a/filtersConfiguration +++ b/filtersConfiguration @@ -14,7 +14,7 @@ set FWHEELS(red,6) "clear" set FWHEELS(blue,1) "Blue-U" set FWHEELS(blue,2) "Blue-G" set FWHEELS(blue,3) "Blue-R" -set FWHEELS(blue,4) "Blue-467" +set FWHEELS(blue,4) "Blue-466" set FWHEELS(blue,5) "Blue-562" set FWHEELS(blue,6) "clear" diff --git a/filtersConfiguration.gemini b/filtersConfiguration.gemini index dce936c8..78706d5c 100644 --- a/filtersConfiguration.gemini +++ b/filtersConfiguration.gemini @@ -13,7 +13,7 @@ set FWHEELS(red,6) "clear" set FWHEELS(blue,1) "Blue-u" set FWHEELS(blue,2) "Blue-g" set FWHEELS(blue,3) "Blue-r" -set FWHEELS(blue,4) "Blue-467" +set FWHEELS(blue,4) "Blue-466" set FWHEELS(blue,5) "Blue-562" set FWHEELS(blue,6) "clear" diff --git a/filtersConfiguration.wiyn b/filtersConfiguration.wiyn index be510fc0..4a6680b9 100644 --- a/filtersConfiguration.wiyn +++ b/filtersConfiguration.wiyn @@ -14,7 +14,7 @@ set FWHEELS(red,6) "clear" set FWHEELS(blue,1) "Blue-u" set FWHEELS(blue,2) "Blue-g" set FWHEELS(blue,3) "Blue-r" -set FWHEELS(blue,4) "Blue-467" +set FWHEELS(blue,4) "Blue-466" set FWHEELS(blue,5) "Blue-562" set FWHEELS(blue,6) "clear" diff --git a/gui-scripts/camera_init.tcl b/gui-scripts/camera_init.tcl index 21b15848..f0960577 100644 --- a/gui-scripts/camera_init.tcl +++ b/gui-scripts/camera_init.tcl @@ -78,7 +78,6 @@ set CAMSTATUS(CoolerMode) 1 set SCOPE(latitude) 31:57:11.78 set SCOPE(longitude) 07:26:27.97 set SCOPE(camera) "Andor iXon Ultra" -set SCOPE(instrument) speckle set SCOPE(observer) "" set SCOPE(target) test set SCOPE(imagetype) OBJECT diff --git a/gui-scripts/gemini_telemetry.tcl b/gui-scripts/gemini_telemetry.tcl index 21cb711e..7c556540 100644 --- a/gui-scripts/gemini_telemetry.tcl +++ b/gui-scripts/gemini_telemetry.tcl @@ -206,7 +206,6 @@ global SCOPE TELEMETRY FITSKEY IMGMETA ANDOR_CFG CAM set TELEMETRY(speckle.andor.numberkinetics) $ANDOR_CFG(numberkinetics) set TELEMETRY(speckle.andor.accumulationcycletime) $ANDOR_CFG(accumulationcycletime) set TELEMETRY(speckle.andor.ccdtemp) $ANDOR_CFG(ccdtemp) - set TELEMETRY(speckle.andor.filter) $ANDOR_CFG(filter) } # \encdode @@ -221,16 +220,16 @@ set ANDOR_CFG(readmode) 0 set ANDOR_CFG(configure) "1 1 1 1024 1 1024 0 0 0 0" set ANDOR_CFG(fitsbits) default set ANDOR_CFG(emccdgain) 0 -set ANDOR_CFG(vsspeed) 0 +set ANDOR_CFG(vsspeed) 1 set ANDOR_CFG(outputamp) 0 -set ANDOR_CFG(preampgain) 0 +set ANDOR_CFG(preampgain) 1 set ANDOR_CFG(0,SerialNumber) 12345 set ANDOR_CFG(1,SerialNumber) 54321 set ANDOR_CFG(temperature) 0.0 set ANDOR_CFG(inputzaber) "NA" set ANDOR_CFG(fieldzaber) "NA" set ANDOR_CFG(numberaccumulations) 0 -set ANDOR_CFG(frametransfer) 0 +set ANDOR_CFG(frametransfer) 1 set ANDOR_CFG(numberkinetics) 0 set ANDOR_CFG(accumulationcycletime) 0.0 set ANDOR_CFG(ccdtemp) 0.0 @@ -258,7 +257,7 @@ set GEMINI(lst) tcs.time.LAST set GEMINI(mjd) tcs.time.MJD set GEMINI(offsetdec) tcs.telescope.decoffset set GEMINI(offsetra) tcs.telescope.raoffset -set GEMINI(programid) speckle.scope.program +set GEMINI(programid) speckle.scope.obsid set GEMINI(rotator) tcs.nir.position set GEMINI(targetname) speckle.scope.name set GEMINI(targetra) tcs.target.az diff --git a/gui-scripts/gui2.tcl b/gui-scripts/gui2.tcl index f5c2cc97..204acdec 100755 --- a/gui-scripts/gui2.tcl +++ b/gui-scripts/gui2.tcl @@ -355,7 +355,6 @@ set STATUS(readout) 0 # Update status display # showstatus "Building user interface" -set SCOPE(instrument) "SPECKLE" set SCOPE(equinox) "2000.0" # @@ -527,6 +526,9 @@ place .main.simtlm -x 150 -y 252 if { $SCOPE(telescope) == "GEMINI" } { checkbutton .main.simpico -bg gray -text "Picos" -variable PICOS(sim) -highlightthickness 0 place .main.simpico -x 85 -y 227 + set SCOPE(instrument) "Alopeke" +} else { + set SCOPE(instrument) "NESSI" } menubutton .main.rawiq -text "DQ - image" -width 21 -fg black -bg gray -menu .main.rawiq.m -relief raised @@ -721,7 +723,7 @@ catch { speckleGuiMode observingGui -startfastvideo + diff --git a/gui-scripts/headerBuilder.tcl b/gui-scripts/headerBuilder.tcl index d8d85f68..e6ae2f7b 100644 --- a/gui-scripts/headerBuilder.tcl +++ b/gui-scripts/headerBuilder.tcl @@ -223,9 +223,9 @@ global TIMER proc obsid { } { global SCOPE TELEMETRY if { $SCOPE(telescope) == "WIYN" } { - set obsid "[set SCOPE(telescope).speckle.20[exec date -u +\%y\%m\%dT\%H\%M\%S]" + set obsid "[set SCOPE(telescope)].speckle.20[exec date -u +\%y\%m\%dT\%H\%M\%S]" } else { - set obsid $TELEMETRY(speckle.scope.program) + set obsid $TELEMETRY(speckle.scope.obsid) } return $obsid } diff --git a/gui-scripts/headers.conf b/gui-scripts/headers.conf index d9a6db2e..5c159b7d 100644 --- a/gui-scripts/headers.conf +++ b/gui-scripts/headers.conf @@ -40,6 +40,7 @@ header wiyn-speckle speckle.andor.head speckle.andor.acquisition_mode speckle.andor.kinetic_time + speckle.andor.kinetic_mode speckle.andor.numexp speckle.andor.read_mode speckle.andor.fullframe @@ -103,6 +104,7 @@ header gemini-speckle speckle.andor.head speckle.andor.acquisition_mode speckle.andor.kinetic_time + speckle.andor.kinetic_mode speckle.scope.numexp speckle.andor.read_mode speckle.andor.fullframe diff --git a/gui-scripts/observe.tcl b/gui-scripts/observe.tcl index 6f90c4d8..092d51c4 100644 --- a/gui-scripts/observe.tcl +++ b/gui-scripts/observe.tcl @@ -23,7 +23,7 @@ proc abortsequence { } { global STATUS set STATUS(abort) 1 andorSetControl 0 abort - .main.observe configure -text "Observe" -bg gray -relief raised -command startsequence + .main.observe configure -text "Observe" -bg green -relief raised -command startsequence .main.abort configure -bg gray -relief sunken -fg LightGray mimicMode red close mimicMode blue close @@ -113,6 +113,8 @@ global ACQREGION CONFIG LASTACQ SCOPE ANDOR_SOCKET ANDOR_CFG ### positionZabers fullframe } set SCOPE(numseq) 1 + set numframes $SCOPE(numframes) + set numseq $SCOPE(numseq) set SCOPE(numframes) 1 if { $rdim != "manual" } { set LASTACQ "fullframe" @@ -138,8 +140,8 @@ global ACQREGION CONFIG LASTACQ SCOPE ANDOR_SOCKET ANDOR_CFG exec xpaset -p ds9red regions system physical exec xpaset -p ds9blue regions system physical if { $rdim != 1024 } { - set reg [split [exec xpaget ds9red regions] \n] - foreach i $reg { + set reg [split [exec xpaget ds9red regions] \n] + foreach i $reg { if { [string range $i 0 8] == "image;box" || [string range $i 0 2] == "box" } { set r [lrange [split $i ",()"] 1 4] set ACQREGION(rxs) [expr int([lindex $r 0] - [lindex $r 2]/2)] @@ -148,9 +150,9 @@ global ACQREGION CONFIG LASTACQ SCOPE ANDOR_SOCKET ANDOR_CFG set ACQREGION(rye) [expr $ACQREGION(rys) + [lindex $r 3] -1] puts stdout "selected red region $r" } - } - set reg [split [exec xpaget ds9blue regions] \n] - foreach i $reg { + } + set reg [split [exec xpaget ds9blue regions] \n] + foreach i $reg { if { [string range $i 0 8] == "image;box" || [string range $i 0 2] == "box" } { set r [lrange [split $i ",()"] 1 4] set ACQREGION(bxs) [expr int([lindex $r 0] - [lindex $r 2]/2)] @@ -159,18 +161,18 @@ global ACQREGION CONFIG LASTACQ SCOPE ANDOR_SOCKET ANDOR_CFG set ACQREGION(bye) [expr $ACQREGION(bys) + [lindex $r 3] -1] puts stdout "selected red region $r" } - } - set CONFIG(geometry.StartCol) [expr $ACQREGION(rxs)] - set CONFIG(geometry.StartRow) [expr $ACQREGION(rys)] - set CONFIG(geometry.NumCols) $rdim - set CONFIG(geometry.NumRows) $rdim - set ACQREGION(geom) $CONFIG(geometry.NumCols) - debuglog "ROI's are red = $ACQREGION(rxs) $ACQREGION(rys) $ACQREGION(rxe) $ACQREGION(rye)" - debuglog "ROI's are blue = $ACQREGION(bxs) $ACQREGION(bys) $ACQREGION(bxe) $ACQREGION(bye)" - commandAndor red "setframe roi" - commandAndor blue "setframe roi" - set LASTACQ roi - .lowlevel.rmode configure -text "Mode=ROI" + } + set CONFIG(geometry.StartCol) [expr $ACQREGION(rxs)] + set CONFIG(geometry.StartRow) [expr $ACQREGION(rys)] + set CONFIG(geometry.NumCols) $rdim + set CONFIG(geometry.NumRows) $rdim + set ACQREGION(geom) $CONFIG(geometry.NumCols) + debuglog "ROI's are red = $ACQREGION(rxs) $ACQREGION(rys) $ACQREGION(rxe) $ACQREGION(rye)" + debuglog "ROI's are blue = $ACQREGION(bxs) $ACQREGION(bys) $ACQREGION(bxe) $ACQREGION(bye)" + commandAndor red "setframe roi" + commandAndor blue "setframe roi" + set LASTACQ roi + .lowlevel.rmode configure -text "Mode=ROI" } else { set ACQREGION(geom) 1024 set ACQREGION(rxs) 1 @@ -190,6 +192,8 @@ global ACQREGION CONFIG LASTACQ SCOPE ANDOR_SOCKET ANDOR_CFG commandAndor blue "setframe fullframe" } } + set SCOPE(numframes) $numframes + set SCOPE(numseq) $numseq } @@ -221,7 +225,7 @@ global SCOPE SPECKLE_DIR INSTRUMENT } } -## Documented proc \c startsequence . +## Documented proc \c checkDataRate . # # This routine checks the data rate # @@ -243,6 +247,11 @@ global SCOPE ANDOR_CFG ACQREGION } } +## Documented proc \c updateTemps . +# +# This routine checks the temperatures +# +# proc updateTemps { } { set redtemp [lindex [commandAndor red gettemp] 0] set bluetemp [lindex [commandAndor blue gettemp] 0] @@ -252,36 +261,21 @@ proc updateTemps { } { .main.bcamtemp configure -text "[format %5.1f [lindex $bluetemp 0]] degC" } - - -## Documented proc \c startsequence . +## Documented proc \c prepsequence . # -# This routine manages a sequence of exposures. It updates bias columns\n -# specifications in case they have been changed, then it loops thru\n -# a set of frames, updating the progress bar. +# This routine prepares for a sequence of exposures. # # Globals : # SCOPE - Telescope parameters, gui setup -# CONFIG - Image geometry configuration -# LASTACQ - Type of last image acqusition # ANDOR_DEF - Andor defaults -# ACQREGION - Sub-frame region coordinates # ANDOR_CFG - Array of camera settings -# ANDOR_SOCKET - Andor camera server socket handles -# ANDOR_SHUTTER - Shutter mode names # SCOPE - Telescope parameters, gui setup -# OBSPARS - Default observation parameters -# FRAME - Frame number in a sequence -# STATUS - Exposure status -# DEBUG - Set to 1 for verbose logging -# TELEMETRY - Array of telemetry for headers and database usage # DATAQUAL - Array of data quality information # INSTRUMENT - Array of instrument configuration data # -proc startsequence { } { -global SCOPE OBSPARS FRAME STATUS DEBUG REMAINING LASTACQ TELEMETRY DATAQUAL SPECKLE_FILTER INSTRUMENT -global ANDOR_CCD ANDOR_EMCCD ANDOR_CFG ANDOR_SHUTTER - set iseqnum 0 +proc prepsequence { } { +global SCOPE DATAQUAL INSTRUMENT +global ANDOR_CCD ANDOR_EMCCD ANDOR_CFG redisUpdate zaberCheck specklesynctelem red @@ -302,6 +296,8 @@ global ANDOR_CCD ANDOR_EMCCD ANDOR_CFG ANDOR_SHUTTER commandAndor blue "autofitds9 $INSTRUMENT(blue,fitds9)" commandAndor red "vsspeed $ANDOR_CFG(red,VSSpeed)" commandAndor blue "vsspeed $ANDOR_CFG(blue,VSSpeed)" + commandAndor red "setexposure $SCOPE(exposure)" + commandAndor blue "setexposure $SCOPE(exposure)" setBinning if { $INSTRUMENT(red,emccd) } { commandAndor red "outputamp $ANDOR_EMCCD" @@ -310,6 +306,7 @@ global ANDOR_CCD ANDOR_EMCCD ANDOR_CFG ANDOR_SHUTTER commandAndor red "hsspeed 0 $ANDOR_CFG(red,EMHSSpeed)" } else { commandAndor red "outputamp $ANDOR_CCD" + commandAndor red "hsspeed 1 $ANDOR_CFG(red,HSSpeed)" } if { $INSTRUMENT(blue,emccd) } { commandAndor blue "outputamp $ANDOR_EMCCD" @@ -318,7 +315,11 @@ global ANDOR_CCD ANDOR_EMCCD ANDOR_CFG ANDOR_SHUTTER commandAndor blue "hsspeed 0 $ANDOR_CFG(blue,EMHSSpeed)" } else { commandAndor blue "outputamp $ANDOR_CCD" + commandAndor blue "hsspeed 1 $ANDOR_CFG(blue,HSSpeed)" } + set tred [commandAndor red "gettimings"] + set tblue [commandAndor blue "gettimings"] + debuglog "Red camera timings are $tred, Blue camera timings are $tblue" commandAndor red "dqtelemetry $DATAQUAL(rawiq) $DATAQUAL(rawcc) $DATAQUAL(rawwv) $DATAQUAL(rawbg)" commandAndor blue "dqtelemetry $DATAQUAL(rawiq) $DATAQUAL(rawcc) $DATAQUAL(rawwv) $DATAQUAL(rawbg)" set cmt [join [split [string trim [.main.comment get 0.0 end]] \n] "|"] @@ -326,6 +327,38 @@ global ANDOR_CCD ANDOR_EMCCD ANDOR_CFG ANDOR_SHUTTER commandAndor blue "comments $cmt" commandAndor red "datadir $SCOPE(datadir)" commandAndor blue "datadir $SCOPE(datadir)" +} + + +## Documented proc \c startsequence . +# +# This routine manages a sequence of exposures. It updates bias columns\n +# specifications in case they have been changed, then it loops thru\n +# a set of frames, updating the progress bar. +# +# Globals : +# SCOPE - Telescope parameters, gui setup +# CONFIG - Image geometry configuration +# LASTACQ - Type of last image acqusition +# ANDOR_DEF - Andor defaults +# ACQREGION - Sub-frame region coordinates +# ANDOR_CFG - Array of camera settings +# ANDOR_SOCKET - Andor camera server socket handles +# ANDOR_SHUTTER - Shutter mode names +# SCOPE - Telescope parameters, gui setup +# OBSPARS - Default observation parameters +# FRAME - Frame number in a sequence +# STATUS - Exposure status +# DEBUG - Set to 1 for verbose logging +# TELEMETRY - Array of telemetry for headers and database usage +# DATAQUAL - Array of data quality information +# INSTRUMENT - Array of instrument configuration data +# +proc startsequence { } { +global SCOPE OBSPARS FRAME STATUS DEBUG REMAINING LASTACQ TELEMETRY DATAQUAL SPECKLE_FILTER INSTRUMENT +global ANDOR_CCD ANDOR_EMCCD ANDOR_CFG ANDOR_SHUTTER + set iseqnum 0 + prepsequence andorSetControl 0 frame 0 andorSetControl 1 frame 0 set autofilter [checkAutoFilter blue] @@ -352,7 +385,7 @@ global ANDOR_CCD ANDOR_EMCCD ANDOR_CFG ANDOR_SHUTTER set dfrmnum $ifrmnum set OBSPARS($SCOPE(exptype)) "$SCOPE(exposure) $SCOPE(numframes) $SCOPE(shutter)" set STATUS(abort) 0 - .main.observe configure -text "working" -bg green -relief sunken + .main.observe configure -text "working" -bg yellow -relief sunken .main.abort configure -bg orange -relief raised -fg black wm geometry .countdown set i 1 @@ -418,7 +451,7 @@ global ANDOR_CCD ANDOR_EMCCD ANDOR_CFG ANDOR_SHUTTER update } set SCOPE(exposureEnd) [expr [clock milliseconds]/1000.0] - .main.observe configure -text "Observe" -bg gray -relief raised + .main.observe configure -text "Observe" -bg green -relief raised .main.abort configure -bg gray -relief sunken -fg LightGray # speckleshutter red close # speckleshutter blue close diff --git a/gui-scripts/speckle_gui.tcl b/gui-scripts/speckle_gui.tcl index 54d417ea..5b0a2425 100644 --- a/gui-scripts/speckle_gui.tcl +++ b/gui-scripts/speckle_gui.tcl @@ -325,9 +325,9 @@ global INSTRUMENT # INSTRUMENT - Array of instrument configuration # proc checkframetransfer { arm } { -global INSTRUMENT - debuglog "Set $arm camera Frame Transfer to $INSTRUMENT($arm,frametransfer)" - commandAndor $arm "frametransfer $INSTRUMENT($arm,frametransfer)" +global ANDOR_CFG + debuglog "Set $arm camera Frame Transfer to $ANDOR_CFG($arm,frametransfer)" + commandAndor $arm "frametransfer $ANDOR_CFG($arm,frametransfer)" } @@ -454,7 +454,6 @@ set CAMSTATUS(CoolerMode) 1 set SCOPE(latitude) 31:57:11.78 set SCOPE(longitude) 07:26:27.97 set SCOPE(camera) "Andor iXon Ultra" -set SCOPE(instrument) speckle set SCOPE(observer) "" set SCOPE(target) test set SCOPE(imagetype) OBJECT @@ -673,7 +672,7 @@ label .lowlevel.lvspeed -bg gray -text "VSpeed" checkbutton .lowlevel.emchk -bg gray -text "Recommend" -variable INSTRUMENT(red,emcheck) -highlightthickness 0 -menubutton .lowlevel.vspeed -width 12 -text "0.6 usec" -fg black -bg gray -menu .lowlevel.vspeed.m -relief raised +menubutton .lowlevel.vspeed -width 12 -text "1.13 usec" -fg black -bg gray -menu .lowlevel.vspeed.m -relief raised menu .lowlevel.vspeed.m .lowlevel.vspeed.m add command -label "0.6 usec" -command "andorset vspeed red VSSpeed 0" .lowlevel.vspeed.m add command -label "1.13 usec" -command "andorset vspeed red VSSpeed 1" @@ -727,7 +726,7 @@ label .lowlevel.lbccdhs -bg gray -text "CCD HS" #SpinBox .lowlevel.bccdhs -width 4 -bg gray -range "0 3 1" -textvariable INSTRUMENT(blue,ccdhs) -validate all -vcmd {validInteger %W %V %P %s 0 3} -menubutton .lowlevel.bvspeed -width 12 -text "0.6 usec" -fg black -bg gray -menu .lowlevel.bvspeed.m -relief raised +menubutton .lowlevel.bvspeed -width 12 -text "1.13 usec" -fg black -bg gray -menu .lowlevel.bvspeed.m -relief raised menu .lowlevel.bvspeed.m .lowlevel.bvspeed.m add command -label "0.6 usec" -command "andorset bvspeed blue VSSpeed 0" .lowlevel.bvspeed.m add command -label "1.13 usec" -command "andorset bvspeed blue VSSpeed 1" diff --git a/gui-scripts/telem-gemini.conf b/gui-scripts/telem-gemini.conf index a3cf5bc9..8a0e0fcc 100644 --- a/gui-scripts/telem-gemini.conf +++ b/gui-scripts/telem-gemini.conf @@ -48,9 +48,9 @@ stream tcs.telescope decoffset DECOFFST Telescope DEC offset zenithdist ZD zenith distance airmass AIRMASS airmass at start of exposure - userfocus FOCUS Telescope focus (microns) pa PARANGLE Parallactic angle instrpa INSTRPA Instrument position angle + userfocus FOCUS Telescope focus (microns) stream speckle.scope target OBJECT Target name @@ -59,7 +59,7 @@ stream speckle.scope imagetype IMAGETYP Type of picture (object, dark, etc.) name TELESCOP Specific system recid RECID archive ID for observation - program PROGRAM Program name + program GEMPRGID Program name instrument INSTRMNT Instrument name category speckle.Exposure_Variables @@ -72,6 +72,7 @@ category speckle.andor head HEAD Head model acquisition_mode ACQMODE Acquisition mode int_time ACT Integration cycle time + kinetic_mode KINMODE Kinetic Mode kinetic_time KCT Kinetic cycle time numberkinetics NUMKIN Series length numaccum ACCUM Accumulations per frame