MODS1 AGw Commissioning at LDG: 25 September 2010 UT
Observers: J. Hill (LBTO), R. Pogge (OSU), R. Stoll (OSU), M. Pedani (LBTO), B. Atwood (OSU)
M. Wagner (LBTO)
and D. Miller (Schult Creek in the San Francisco mountains)
Telescope Operator: DHuerta (LBTO)
Software Support: TLeibold (Tucson)
Telescope Support: JUrban (LBTO)
Instrument Support: JMorris (LBTO)
Summary
We were on-sky all-night in a clear to partly cloudy sky. We had images as good as 1.2 arcsec with eyeball collimation. Seeing got bad (3 arcsec) after midnight and slowed progress.
All the AzCam weirdness is gone with the Python version. Thanks to Torsten and Mike.
We found that offsets (PCS) do not get the hotspot added to the probe coordinates so the probe misses the star.
See Issue 2881. We are hoping for a GCS patch from Torsten on Saturday or Sunday.
We discovered that off-axis stars have the pupil shifts transposed in X-Y compared to the AIP AGWs. With
assistance from Doug on the phone at his campfire, John changed the IDL code to deal with this and predict
the pupil shift correctly. John is still working on adjusting the lenslet_edge parameters so they work in all directions.
The main active optics problem is that neither GCS nor IDL converge to a sensible result on axis. John thinks this
is because the lenslets are rotated with respect to the CCD pixels by ~1.75 degrees. That rotation causes some of the
outer spots to lap onto the next box in the grid causing them to have bogus centroids. The rotation should not bother the zernike analysis, but it screws up the current method of measuring the centroids. We rotated one image in Vista
and then reanalyzed it, and things looked more normal. We will think tomorrow about how we can hack the idl code
to fix this. (prerotate the image before analysis?, use sextractor to find spots?, derotate the grid of boxes for the centroids?, better ideas from Doug?)
MODS took its first engineering spectrum on-sky while John was fiddling with active optics.
We took pointing data with the MODS guider on-axis for the last hour of the night.
Preparations
MODS AzCam Servers
Torsten and Mike Lesser updated the two MODS AzCam servers to run on the Python version of AzCam.
GCS
We went back to the latest GCS build from midnight last night. GCS.2010092303
00:41 restarted GCSL
Changes to OSU_L.cfg:
WFS_rotAngleOffs 210.0 double # rotator angle offset between rotator and AGw camera if probe in center
(was previously 180)
WFS_probeRotationFactor 0.0 float # used to change how the probe rotation is added to the rotator angle (use -1.0 to subtract it from rotator)
Is zero a legal value?
00:40 Jeff is rechecking the torque on the instrument mounting clamps.
Changes to agw_set_values.pro in IDL
agw[4].rot_offset = 210.0
(was previously 180)
John's email to Doug:
I couldn't find any parameters in your code for suppressing
wfsc.params.rot_delta when MODS in used. Because MODS has a pure X-Y
stagee rather than R-theta, the pupil doesn't rotate on the CCD as the
probe moves around the field. Have you taken care of this somewhere
that I haven't found?
P.S. I haven't changed any IDL code on this point. I'll hack
zernike_rotation_setup.pro if needed.
Pointing Model
Updated PCSInstrument.conf
LEFTPOINTINGMODEL MODSSX.20100924.ptmod with IE=-37 CA=+23
We also made the guide wavelength different than the target wavelength so that we can distinguish between
"on-axis" and (0,0).
LEFTWAVELENGTH 0.750
LEFTGUIDEWAVELENGTH 0.575
Details
Open
01:45 Open T=9.5 degC, D=5.5 degC, Wind light from the West, sky mostly clear but not yet photometric.
01:52 Preset to a pointing star in ACQUIRE mode. Note: adjust pointing to put the star in the middle of the field not on the guide spot. The guide probe moves to put the star on the spot when we guide. Adjust
IE=-9 CA=+30 back closer to the original pointing model (?). EL=70
Sep 25 01:51:35 tcs4 LBT_left_GCS:
AGWUnitMODS: moving probe to native coords: 0.000028, -0.031392 mm using external transformations
02:08 Guide Preset Star 1136 off-axis in StoneO
02:15 Active Preset to same star. This has light in the WFS even though I can't remember updating the guiding hotspot
after our measurements at the end of last night. WFS is converging, but we are not well-centered in the WFS aperture. The 30 degree rotation really helped. This is PA=0, with star still close to the Y-axis.
Torsten says date year in FITS headers are 110.
guidecam_hotspot_y 421.0 to 424.0 (didn't restart GCS)
02:22 Clear C00
02:23 Active preset to
StoneO_1541, missed because star was out of focus and ND was in.
02:25 Active preset to
StoneO_1541, sextractor couldn't deal with defocused donut.
02:26 Acquire preset to same star, David adjusts Z-global (taking out the residuals from excess Z11 cleared previously)
Z-global goes to -0.20
Stop and restart GCSL to pickup hotspot parameters. selectAGW
02:29 Active preset to same star. sextractor missed the star. Why? Torsten reads apparently correct coords from the
log from sextractor, but the coords in the header that control the red plus are wrong. See acquire 00013 - 15.
02:36 Active preset on 1136 with ND is fine.
Problem must be in sextractor. Marco will check on it. We need to get the proper pixel scale into sextractor.
02:41 Clear Active Optics
Stop reporting zernikes
Finding the Hotspot Position
02:46 Clear Active Optics
02:49 preset on-axis 12-mag WT10_270
Stop sending centroids to PCS
Scanning guide probe to find optimum hotspot.
setWFSExpTime left 15000
02:56 Start the real scanning of the probe. Rick is taking 0.5 mm steps.
The answer is probe at x=+0.37 y=-15.6
Take fullframe guider images to measure hotspot with data in /OldRepository/AGW_Data/20100925
03:05 guiderimage000001-3 261,431
guidecam_hotspot_x 261.0 double # ccd x coordinate of pixel that represents center of light in WFS pupil
guidecam_hotspot_y 431.0 double # ccd y coordinate of pixel that represents center of light in WFS pupil
WFScam_offset_x -0.37 double # position offset in x mm to move star from center onto WFS pinhole (guidecam hotspot)
WFScam_offset_y -15.6 double # position offset in y mm to move star from center onto WFS pinhole (guidecam hotspot)
Note sign change between stage coordinates and SFP coords!
03:10 Stop and restart GCSL to get new params. selectAGW
Various Active Optics Tests
03:11 Active preset to same star
03:16 Clear Active Optics after we hit Y-limit.
03:17 Active preset to same star
WFScam_offset_y -13.5
03:22:40 Strange excursion of guide star almost out of the guide box. It was the mirror hitting the limit. But I had
turned sending of zernikes off?
WFScam_offset_x 0.37 double # position offset in x mm to move star from center onto WFS pinhole (guidecam hotspot)
WFScam_offset_y -13.4 double # position offset in y mm to move star from center onto WFS pinhole (guidecam hotspot)
WFScam_offset_y -13.1 double # position offset in y mm to move star from center onto WFS pinhole (guidecam hotspot)
Z7=+2000
Z8 -1000
Zglobal =0.28
Image is now 1 arcsec.
Start idl gcs_wfsc_display starting with wfscimage 0000136-0156
It looks like the scale of the MODS pupil on the wfs is different the and AIP pupil on the WFS, so (Doug calls from Flagstaff)
this means we have astigmatism.
MODS people are presetting to a spectroscopic target (still taking images) while John (and Doug) are sorting out active optics.
Their presets and offsets are not accurately reflected in the wikilog.
03:55 Hit collimation limit, so Clear Active optics, but this time the residual coma is very small. Why is the raw collimation
model so much better now (few hundred nm of coma, and 1.4 arcsec image)? Less temperature gradient than earlier?
Change to zernike_rotation_setup.pro
; HACKED FOR MODS by JMH 20100925
; because the MODS probe is pure x-y and doesn't rotate
wfsc.params.rot_delta = 0.0
; comment out the above line for AIP AGw
; END OF HACK
04:06 Offset failed. Is there a sign issue in offsets? No, the offset to the hotspot is missing - see below.
Sep 25 04:05:39 tcs4 LBT_left_GCS: AGWUnitMODS: moving probe to native coords: 51.449760, -154.483276 mm using external transformations
Sep 25 04:06:25 tcs4 LBT_left_GCS: AGWUnitMODS: moving probe to native coords: 51.495673, -136.467194 mm using external transformations
04:10 trying to collimate with idl, but collimate_once crashes.
% Attempt to subscript PARTS with is out of range.
% Execution halted at: INFO_DATE 27 /home/LBTO/idl/wfsc/info/info_date.pro
% FITS_FILE_TO_STRUCT 48 /home/LBTO/idl/wfsc/fits/fits_file_to_struct.pro
Doug called again at a very convenient time.
HACKED info_date.pro to exchange the swapped date.date and date.time in the header
04:40 Now in wfsc000007 we see that the pupil shift is wrong for the off-axis star.
=> Pupil Positioning: X Y
On-Axis Pupil = 361.00 254.50
Pupil Shift = -9.20 -26.92
Pupil Center = 374.25 241.35
Z7 +1000
Z8 +1000
in agw_setvalues.pro
agw[4].pupil_direction = -1.0 to +1.0
wfsc000008 has the pupil wrong the other way. After some discussion with Rick, we think that the pupil shift X and Y directions
are exchanged.
=> Pupil Positioning: X Y
On-Axis Pupil = 361.00 254.50
Pupil Shift = 9.20 26.92
Pupil Center = 347.65 281.25
05:00 Preset active on-axis to a star for collimation ACT_0238
in agw_setvalues.pro
agw[4].pupil_direction = +1.0 restored to -1.0
now gcs_wfsc_display fails with the info_date problem
Trying to manually apply GCS calculated zernikes. Z4, Z7, Z8. Something is wrong with them, as they don't converge to
the correct focus.
Experimenting
While John is trying to figure out the WFS system, we are taking pictures with MODS1 Red channel to exercise the system
05:20 - looking at globular cluster M15, we picked an arbitrary guide field. We saw an interesting failure mode. Two plausible
guide stars are within 5-arcsec of each other. Both are of roughly comparable brightness. The sextractor algorithm picked the
brightest one and moved it into the WFS beam splitter pick off. While both were roughly behind the 50/50 beam splitter, they were roughly
the same brightness, when the system offset the star of the two it picked as "brightest", its near partner was moved out of the
beam splitter field and immediately became 2x brighter. The guide algorithm then picked that one and tried to move it onto the hotspot
behind the beam splitter, pushing its partner off the beam splitter on the other side, basically setting up a Buridan's Ass situation,
and eventually the guide lock failed.
05:24 Aha! The AGW2 Python AzCam also has TIME-OBS and DATE-OBS exchanged, so Doug has a patch for that in fits_gcs_to_struct.pro. Now I have installed the same patch in fits_file_to_struct.pro. And I have put info_date.pro
back to normal
05:25 wfsc000009 - IDL calculates the Y-shift, but the shift on the image seems to be X-shift. This seems to
confirm our speculation above.
=> Pupil Positioning: X Y
On-Axis Pupil = 361.00 254.50
Pupil Shift = 0.07 -28.23
Pupil Center = 360.95 241.35
Doug calls from his camping spot, and helps me understand how to fix this transposed/rotated pupil shift
problem. There are two parts: a) recaculating the shift, and b) adjusting the search range of the lenslet edge.
05:57 For a) Added the following to recon_process_image.pro to rotate the pupil shift by 90-deg without a probe angle correction.
wfsc.params.rotation_pos = asin(1.0)
Oops, I used the wrong variable
Team MODS is back to testing offsets while I work on this.
06:03 collimate_once
wfsc000010 shifted in X correctly, but it went the wrong way.
=> Pupil Positioning: X Y
On-Axis Pupil = 361.00 254.50
Pupil Shift = -24.63 0.00
Pupil Center = 387.55 254.65
Added the following to recon_process_image.pro to rotate the pupil shift by -90-deg without a probe angle correction.
wfsc.params.rotation_pos = asin(-1.0)
06:05 wfsc00011 now has the correct pupil shift off-axis
=> Pupil Positioning: X Y
On-Axis Pupil = 361.00 254.50
Pupil Shift = 24.63 0.00
Pupil Center = 347.65 254.65
06:12 It appears that relative offsets are failing because offsets are moving the probe relative to the central position
and not relative to the hotspot position, because PCS knows nothing of the 14 mm hotspot offset.
Sep 25 05:57:09 tcs4 LBT_left_GCS: AGWUnitMODS: moving probe to native coords: 28.121189, -120.908559 mm using external transformations
Sep 25 05:57:43 tcs4 LBT_left_GCS: AGWUnitMODS: moving probe to native coords: 27.751000, -134.008000 mm using external transformations
Sep 25 06:06:49 tcs4 LBT_left_GCS: AGWUnitMODS: moving probe to native coords: 23.010702, -120.910839 mm using external transformations
This is Issue 2881. We are hoping for a patch from Torsten tomorrow evening.
wfsc000012
Z6 -1902
wfsc000013
06:24 Preset to another guide star which is same Y but different X, to test the Y-pupil shift.
wfsc000014 - The Y-shift went the wrong way, and the output may have been messed up by my hack. This star should have had both an X and Y shift.
=> Pupil Positioning: X Y
On-Axis Pupil = 361.00 254.50
Pupil Shift = 23.45 0.00
Pupil Center = 347.65 254.65
Sep 25 06:24:52 tcs4 LBT_left_GCS: AGWUnitMODS: moving probe to native coords: -57.901449, -103.395338 mm using external transformations
Sep 25 06:25:26 tcs4 LBT_left_GCS: AGWUnitMODS: moving probe to native coords: -58.272000, -116.497000 mm using external transformations
There may also be a problem with the position of x-y relative to center versus x-y relative to the hotspot?
This was an on-axis star:
=> Time of Observation: 20:03:41.421
=> AGW Parameters:
Guide Probe X = 0.35
Guide Probe Y = -14.89
Guide Probe Z = 0.00
So either the y-offset has to be removed, or it has to be included in the on-axis pupil position.
07:21 Did this to recon_process_image.pro transposing the two shifts.
; HACK #2 FOR MODS by JMH 20100925
; THE NEXT TWO COMMENTED OUT LINES ARE THE NORMAL AIP CODE
; wfsc.params.pupil_x_center = agw[station_num].pupil_x_on_axis - wfsc.params.pupil_x_shift
; wfsc.params.pupil_y_center = agw[station_num].pupil_y_on_axis + wfsc.params.pupil_y_shift
; THE NEXT TWO LINES ARE THE X-Y TRANSPOSED SHIFTS FOR MODS
wfsc.params.pupil_x_center = agw[station_num].pupil_x_on_axis - wfsc.params.pupil_y_shift
wfsc.params.pupil_y_center = agw[station_num].pupil_y_on_axis + wfsc.params.pupil_x_shift
; END OF HACK #2
07:40 guideWindowSize 100 ushort
07:45 John is in some IDL programming hell, where restarting idl doesn't pick up new copies of the programs that
I have editted.
08:00 John sending IDL computed zernikes on-axis up to wfsc00000019. It has same problem as GCS that the
Z4 value computed by IDL does not optimize the focus on the guider image. Is this a software problem or
collimate_process_file calls:
fits_file_to_struct or fits_gcs_to_struct
recon_determine_zernikes
zernike_process
The escape from hell is that you have to remove the .sav file if collimate_process_file, 'wfsc000009_dd.fits' will rerun recon_process_image
X-shift for MODS: Y-shift for MODS:
-28.2308 0.0691200
Reprocessed wfsc000009
collimate_process_file, 'wfsc000009_dd.fits'
=> Time of Observation: 20:03:41.421
=> AGW Parameters:
Guide Probe X = 0.38
Guide Probe Y = -156.84
Guide Probe Z = 0.00
=> Pupil Positioning: X Y
On-Axis Pupil = 361.00 254.50
Pupil Shift = 0.07 -28.23
Pupil Center = 347.65 254.65
collimate_process_file, 'wfsc000014_dd.fits'
X-shift for MODS Y-shift for MODS
-20.9698 10.4890
=> Time of Observation: 20:03:41.421
=> AGW Parameters:
Guide Probe X = 58.27
Guide Probe Y = -116.50
Guide Probe Z = 0.00
=> Pupil Positioning: X Y
On-Axis Pupil = 361.00 254.50
Pupil Shift = 10.49 -20.97
Pupil Center = 347.65 241.35
These are now the correct signs of the transposed shifts in recon_process_image.pro. This completes step a).
; HACK #2 FOR MODS by JMH 20100925
; THE NEXT TWO COMMENTED OUT LINES ARE THE NORMAL AIP CODE
; wfsc.params.pupil_x_center = agw[station_num].pupil_x_on_axis - wfsc.params.pupil_x_shift
; wfsc.params.pupil_y_center = agw[station_num].pupil_y_on_axis + wfsc.params.pupil_y_shift
; THE NEXT TWO LINES ARE THE X-Y TRANSPOSED SHIFTS FOR MODS
wfsc.params.pupil_x_center = agw[station_num].pupil_x_on_axis + wfsc.params.pupil_y_shift
wfsc.params.pupil_y_center = agw[station_num].pupil_y_on_axis - wfsc.params.pupil_x_shift
print, 'X-shift for MODS Y-shift for MODS '
print, wfsc.params.pupil_y_shift, wfsc.params.pupil_x_shift
; END OF HACK #2
08:50 seeing has gotten quite bad, and some clouds are cruising by.
08:51 Stop MODS1agw server. Stop GCSL. Restart new version of the MODS1agw server. Restart GSCL. selectAGw.
WFScam_offset_y -15.1
09:00 Stop and restart GCS, selectAGW
WFScam_offset_y -13.1
09:03 cp -p GCS.2010092401_NEW GCS
09:12 collimate_multiple, 1, /send
starting with wfsc000020-27 (on-axis)
Z10 seems to be running away. Is it an angle problem or a pupil distortion problem?
guideWindowSize 75
09:22 Clear C00.
Set PSF Gain for Z9, Z10 to zero
09:24 collimate_multiple, 3, /send starting wfsc000028-30
09:27 Clear C00
Set PSF Gain for Z5, Z6 to zero
09:32 collimate_multiple, 3, /send starting wfsc000031-39
Focus and Coma have converged, but image looks comatic, albeit in 2.5 arcsec seeing.
Trying to apply known Zernikes, but seeing is bad.
09:40 Add -2000 Z7
09:42 collimate_multiple, 3 starting wfsc000040-42
The spot pattern is so distorted that IDL isn't measuring any Z7 or Z8.
09:45 Add another -2000 Z7 (net -4000 from the convergence point)
collimate_multiple, 3 starting wfsc000043-45
09:49 Send +2000 Z4
collimate_multiple, 3 starting wfsc000046-48
09:52 +3000 Z7
collimate_multiple, 3 starting wfsc000049-51
09:57 Clear Active Optics
09:59 Remove big corrections in Secondary Offload. Where did they come from as we've been in "primary" mode all
night?
collimate_multiple, 3 starting wfsc000052-54
These uncorrected pupils in bad seeing appear to have the x and y scales of the lenslets matching the expected grid,
but there is a systematic displacement in X by about 0.25 lenslets.
Seeing improves to 2.3 arcsec so grab some more data.
collimate_multiple, 3 starting wfsc000055-57
10:18 Add +1000 Z5 (the direction IDL would like to go)
collimate_multiple, 3 starting wfsc000058-60
10:21 Add +3000 Z5
collimate_multiple, 3 starting wfsc000061-63
10:25 Add -4000 Z5
collimate_multiple, 3 starting wfsc000064-66
10:27 Add +1000 Z5
collimate_multiple, 3 starting wfsc000067-69
The seeing is awful, so it makes the results much harder to interpret. Here's what I think is going on.
I think the lenslet array is slightly rotated compared to the CCD columns (0.4 lenslets across the pupil).
This means that some of the spots are split between two boxes, and the centroid is ruined for those boxes.
I speculate that this is confusing the centroids and driving us into an unstable null.
Rick using Vista to rotate wfsc000055.fits Rotate by -1.75 degrees. wfs_mods_rot.fits
Pointing Data
Seeing is too awful to do anything else,
How do we send a preset that doesn't move the guider?
10:58 Track preset with MODS to see where the guider goes. GCS send illegal park position.
Sep 25 10:59:21 tcs4 LBT_left_GCS: AGWUnitMODS: SFP position to move to: 90.000000, 200.000000 mm
Sep 25 10:59:21 tcs4 LBT_left_GCS: AGWUnitMODS: internal transformation to AGW native coords: 90.000000, 200.000000 mm
Sep 25 10:59:21 tcs4 LBT_left_GCS: AGWUnitMODS: external transformation to AGW native coords: -90.000000, 200.000000 mm (oacontrol)
Sep 25 10:59:21 tcs4 LBT_left_GCS: AGWUnitMODS: moving probe to native coords: -90.000000, 200.000000 mm using external transformations
Why did we have to invert the Y-value.
park_x -90.0 double # AGW native X coordinate to park the probe and get it out of the way
park_y 200.0 double # AGW native Y coordinate to park the probe and get it out of the way
11:05 Restart GCSL
John modifies gopoint.cl into gopoint_mods.cl
so that it sends a MODS track preset and then takes a readGuideCam image (parameters hardwired for now).
Start pointing logging PointingLog09-25-2010
11:06 Track preset again
Cheat the park positon to be on-axis
park_x 0.0 double # AGW native X coordinate to park the probe and get it out of the way
park_y 0.0 double # AGW native Y coordinate to park the probe and get it out of the way
Remember to restore the park position later!!!!!
Working in /OldRepository/MODS_Pointing
prepdir doesn't like MODS as a camera
gopoint_mods - first good image is guider0005
Note that we haven't measured the rotator center yet, so you should use 256,256 as the target
11:33 pointto ACT0357 ACQUIRE - Adjust IE=-17 CA=+25
ACT0406 is guider00006 (some of these early images were saturated.
11:43 unwrap toward AZ=375
Put in neutral density filter in guider, but some issues.
ACT0342 is guider00009, still saturated
Change to
Pointingstar5F
ACT0342F, but now pointto crashes because the F stars aren't in the catalog
Real Pointing Data starts here
back to regular stars with B-Bessel filter on guider.
12:04 1 WT10_370 is guider000011 (almost saturated in 1 second)
12:42 26 WT10_408 is guider000036
We are using this model for data collection.
*** Pointing Model Terms ***
IA -404.27020
IE -17.00000
NPAE -4.46510
CA 25.00000
AW -3.00460
AN 21.04090
TF 34.59910
HACA2 -4.00140
TX 7.85370
A1A 5.78450
Close
12:45 Close for impending dawn T=9.2 degC D=4 degC Wind 8m/sec from East. Sky mostly clear.
Put the park position back to normal, and stop the pointing log.
park_x -90.0 double # AGW native X coordinate to park the probe and get it out of the way
park_y 200.0 double # AGW native Y coordinate to park the probe and get it out of the way
Afternoon Post-Processing
In the light of 3PM rather than 3AM, I'm now sure that the rotation of the lenslets compared to the CCD columns is the problem.
See the two attached JPEG images below which are screen snaps of IDL graphics. Look at the spots and the vectors in the top row (row 12). In mods000055.jpg, (the image we rotated by 1.75 degrees) the vectors properly point to the spot centroids. In wfsc000055.jpg, the vectors in the top row are nearly zero -- because the centroid is averaging half a spot on the left side of the box and half a spot on the right side of the box.
--
MarcoPedani - 24 Sep 2010
- Analysis of Image Rotated by 1.75 degrees:
- Analysis of unrotated Image: