[INSTRM-388] Create WCS cards for MCS images. Created: 20/Jun/18  Updated: 16/Oct/18  Resolved: 14/Oct/18

Status: Done
Project: Instrument control development
Component/s: ics_mcsActor
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: cloomis Assignee: yuki.moritani
Resolution: Done Votes: 0
Labels: MCS
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
is blocked by INSTRM-466 Convert some/all Gen2 status into MHS... Done
Relates
relates to INSTRM-525 Create MCS WCS header using new pfs_u... Done
Epic Link: INSTRM-484

 Description   

I believe we are required by Subaru to have WCS cards. We could, in operations, have pixel – sky transforms. We probably always want pixel – focal plane (mm)?

Per INSTRM-484, this must go in HDU1, with the image.

We don't have rotation yet, but will.



 Comments   
Comment by cloomis [ 14/Sep/18 ]

The distortion routines freshly put into `pfs_utils` have sky-to-mcs, mcs-to-pfi, and pfi-to-mcs. We can probably use these to generate pretty good WCS solutions for both maps.

Comment by cloomis [ 02/Oct/18 ]

This covers items 2, part of 19, 20, 24 from INSTRM-388

Comment by cloomis [ 02/Oct/18 ]

Can we add, say, genWCS(rot, alt) routines to pfsutils.coordinates? I do not know enough to recommend WCS python modules, but the ICS environment does include astropy, which has astropy.wcs.

Comment by hassan [ 03/Oct/18 ]

yuki.moritani: I've re-assigned this issue to you as you have coordinate transformation experience. Please contact cloomis or chyan if you need support on WCS matters.

Comment by yuki.moritani [ 03/Oct/18 ]

Well, the current distortion routines treat symmetric scaling and deviation from scaling separately, so we my be able to start with using the former as a first step.

The scaling part is called

// def ScalingFactor(xyin, c):

and it consists of polynomials and residual. I think we can also skip residual, which I used interpolation.

So, as a first step, we could create WCS card by

  • Referring the PFI center position on MCS
  • Referring the coefficients of polynomials dis_rsc for the symmetric scaling

 What do you think?
I think distortion coefficients will be accommodated in a separate place from script itself (INSTRM-277), I guess the above can be done without distortion routine.

Comment by cloomis [ 09/Oct/18 ]

Agreed, and I'd even go further: linear is probably fine for now.

The routines documented in http://docs.astropy.org/en/stable/wcs/#building-a-wcs-structure-programmatically are probably what we should use.

Comment by yuki.moritani [ 09/Oct/18 ]

Thank you for the pointer. I'll read it and put a draft here later.

Comment by yuki.moritani [ 12/Oct/18 ]

cloomis I pushed a code to treat this, although I claimed "TBD" for world coordinates.

It is called with mode (the same as the coordinate code), center position, alt and az, like

MakeWCSCards.WCSParameters("mcs_pfi", [centx,centy], 0., 90. , 0.]

The all angles are in degree.
It returns WCS and SIP parameters.

Could you see if it is what you expect so far?

Comment by cloomis [ 12/Oct/18 ]

At first glance that looks perfect. [ I'll push a couple of tiny changes to your branch ]

Generated at Sat Feb 10 16:24:29 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.