CaltechOpticalObservatories / NGPS

NGPS Software
3 stars 0 forks source link

Account for spatial binning in ACAM WCS headers #203

Open chazshapiro opened 6 days ago

chazshapiro commented 6 days ago

Like the title says...

astronomerdave commented 2 days ago

@chazshapiro is this working correctly for slicecam?

chazshapiro commented 2 days ago

PIXSCALE is not correct. It should get multiplied by the bin factor (assumes box axes are the same binning)

chazshapiro commented 2 days ago

Other SCAM headers look OK

astronomerdave commented 1 day ago

Can you detail what "account for" means for the two cameras? Currently, slicecam does this:

    // adjust WCS parameters for binning
    //
    hbin   = slicecam->camera_info.hbin     // horiz binning factor
    vbin   = slicecam->camera_info.vbin     // vert binning factor
    crpix1 = fpoffsets.sliceparams[cam].crpix1 / hbin
    crpix2 = fpoffsets.sliceparams[cam].crpix2 / vbin
    cdelt1 = fpoffsets.sliceparams[cam].cdelt1 * hbin
    cdelt2 = fpoffsets.sliceparams[cam].cdelt2 * vbin

and acam does this:

    cdelt1 = camera.andor.camera_info.pixel_scale/3600.     // pixel_scale set=0.6 in config file
    cdelt1 = camera.andor.camera_info.pixel_scale/3600.
    crpix1 = camera.andor.camera_info.hend/2     // hend is horiz ending pixel
    crpix2 = camera.andor.camera_info.vend/2     // vend is vert ending pixel

If binning not square then what do you want PIXSCALE to be? NAN?

chazshapiro commented 1 day ago

Now get the same parameters (PIXSCALE, CRPIX, CDELT) from FPoffsets.acam_params and do the same arithmetic

If binning is not the same, leave PIXSCALE blank