taskGNU Astronomy Utilities - Tasks: task #15670, Calculating reverse coefficients...


You are not allowed to post comments on this tracker with your current authentication level.

task #15670: Calculating reverse coefficients of TPV to SIP

Submitted by:  Sachin Kumar Singh <sks_15>
Submitted on:  Tue 02 Jun 2020 09:35:33 PM UTC  
Should Start On:  Tue 02 Jun 2020 12:00:00 AM UTC Should be Finished on:  Fri 05 Jun 2020 12:00:00 AM UTC
Category:  None Priority:  5 - Normal
Item Group:  New feature Status:  Done
Privacy:  Public Percent Complete:  100%
Assigned to:  Sachin Kumar Singh <sks_15> Open/Closed:  Closed
Effort:  0.00

Fri 05 Jun 2020 08:33:32 PM UTC, comment #4: 


Mohammad Akhlaghi <makhlaghi>
Project Administrator
Fri 05 Jun 2020 06:41:19 PM UTC, comment #3: 

The TPV->SIP conversion for both the forward and reverse coefficients is done. For the purpose of modularisation, task #15675 was opened so that it can be implemented later on more completely. The code for both of them can be seen in this repo. The headers from both the `astropy` output and the test Gnuastro library are shown below(only showing the sip keywords):

astropy output

A_0_0   =  -0.5947048847413352
B_0_0   =   0.1137978770789058
A_0_1   = 0.000511373196373184
B_0_1   = -4.8067996495371E-06
A_0_2   = 9.71733789710970E-07
B_0_2   = 1.57430693484096E-07
A_0_3   = -6.2376422946773E-10
B_0_3   = 1.09648212062142E-10
A_1_0   = 0.000870132842249571
B_1_0   = 2.29272972829264E-05
A_1_1   = 5.60499034638399E-07
B_1_1   = -1.0267461779178E-07
A_1_2   = -2.5505398795854E-10
B_1_2   = 1.13553198176252E-11
A_2_0   = 1.01770599638340E-07
B_2_0   = 2.11610454127566E-08
A_2_1   = -2.1900816534747E-10
B_2_1   = -8.7030409127488E-11
A_3_0   = -4.3245647824626E-10
B_3_0   = 9.78774775200160E-12
A_ORDER =                    3
B_ORDER =                    3
AP_0_0  =   0.5947027254480975
AP_0_1  = -0.00051084722098179
AP_0_2  = -9.7142740986240E-07
AP_0_3  = 6.23006145804294E-10
AP_1_0  = -0.00087013061449738
AP_1_1  = -5.6125824591147E-07
AP_1_2  = 2.55427199875223E-10
AP_2_0  = -1.0182575316762E-07
AP_2_1  = 2.19178111884920E-10
AP_3_0  = 4.32572863312097E-10
BP_0_0  =  -0.1137554307878905
BP_0_1  = 4.86538043105739E-06
BP_0_2  = -1.5782581966889E-07
BP_0_3  = -1.0913649219761E-10
BP_1_0  = -2.3010534103024E-05
BP_1_1  = 1.02678606812591E-07
BP_1_2  = -1.1385628397709E-11
BP_2_0  = -2.1189099828072E-08
BP_2_1  = 8.69309671092149E-11
BP_3_0  = -9.7657624529546E-12
AP_ORDER=                    3
BP_ORDER=                    3

test Gnuastro library:

A_ORDER =                    3 / SIP polynomial degree, axis 1, pixel-to-sky
A_0_0   =  -5.947048847413E-01 / SIP distortion coefficient:
A_0_1   =   5.113731963732E-04 / SIP distortion coefficient: y
A_0_2   =   9.717337897110E-07 / SIP distortion coefficient: yy
A_0_3   =  -6.237642294677E-10 / SIP distortion coefficient: yyy
A_1_0   =   8.701328422496E-04 / SIP distortion coefficient: x
A_1_1   =   5.604990346384E-07 / SIP distortion coefficient: xy
A_1_2   =  -2.550539879585E-10 / SIP distortion coefficient: xyy
A_2_0   =   1.017705996383E-07 / SIP distortion coefficient: xx
A_2_1   =  -2.190081653475E-10 / SIP distortion coefficient: xxy
A_3_0   =  -4.324564782463E-10 / SIP distortion coefficient: xxx
AP_ORDER=                    3 / SIP polynomial degree, axis 1, sky-to-pixel
AP_0_0  =   5.947027256946E-01 / SIP inverse coefficient:
AP_0_1  =  -5.108472207693E-04 / SIP inverse coefficient: y
AP_0_2  =  -9.714274099989E-07 / SIP inverse coefficient: yy
AP_0_3  =   6.230061458592E-10 / SIP inverse coefficient: yyy
AP_1_0  =  -8.701306143968E-04 / SIP inverse coefficient: x
AP_1_1  =  -5.612582459744E-07 / SIP inverse coefficient: xy
AP_1_2  =   2.554271997553E-10 / SIP inverse coefficient: xyy
AP_2_0  =  -1.018257530987E-07 / SIP inverse coefficient: xx
AP_2_1  =   2.191781118001E-10 / SIP inverse coefficient: xxy
AP_3_0  =   4.325728632946E-10 / SIP inverse coefficient: xxx
B_ORDER =                    3 / SIP polynomial degree, axis 2, pixel-to-sky
B_0_0   =   1.137978770789E-01 / SIP distortion coefficient:
B_0_1   =  -4.806799649759E-06 / SIP distortion coefficient: y
B_0_2   =   1.574306934841E-07 / SIP distortion coefficient: yy
B_0_3   =   1.096482120621E-10 / SIP distortion coefficient: yyy
B_1_0   =   2.292729728293E-05 / SIP distortion coefficient: x
B_1_1   =  -1.026746177918E-07 / SIP distortion coefficient: xy
B_1_2   =   1.135531981763E-11 / SIP distortion coefficient: xyy
B_2_0   =   2.116104541276E-08 / SIP distortion coefficient: xx
B_2_1   =  -8.703040912749E-11 / SIP distortion coefficient: xxy
B_3_0   =   9.787747752002E-12 / SIP distortion coefficient: xxx
BP_ORDER=                    3 / SIP polynomial degree, axis 2, sky-to-pixel
BP_0_0  =  -1.137554307916E-01 / SIP inverse coefficient:
BP_0_1  =   4.865380431666E-06 / SIP inverse coefficient: y
BP_0_2  =  -1.578258196681E-07 / SIP inverse coefficient: yy
BP_0_3  =  -1.091364921971E-10 / SIP inverse coefficient: yyy
BP_1_0  =  -2.301053410235E-05 / SIP inverse coefficient: x
BP_1_1  =   1.026786068123E-07 / SIP inverse coefficient: xy
BP_1_2  =  -1.138562839701E-11 / SIP inverse coefficient: xyy
BP_2_0  =  -2.118909982744E-08 / SIP inverse coefficient: xx
BP_2_1  =   8.693096710961E-11 / SIP inverse coefficient: xxy
BP_3_0  =  -9.765762452377E-12 / SIP inverse coefficient: xxx

This task can be closed now.

Sachin Kumar Singh <sks_15>
Project MemberIn charge of this item.
Tue 02 Jun 2020 10:03:37 PM UTC, comment #2: 

That sounds great! Having wrappers for GSL in GNU Astro will be really helpful in future tasks.

Sachin Kumar Singh <sks_15>
Project MemberIn charge of this item.
Tue 02 Jun 2020 09:53:35 PM UTC, comment #1: 

Please implement the fitting of a 2D array with a polynomial through GSL as a generic/modular function and call it for this task.

The reason I am suggesting this is that we can use such a function in several other Gnuastro programs in other contexts. Later, we'll create a new '.h' file (maybe called 'nlinfit.h' for non-linear fit) for it in Gnaustro's library.

But for now, if its just a simple/modular function, it would be good: taking in a 2D array (as 'gal_data_t' and a set of parameters) and returning an array of polynomial coefficients (ideally as 'gal_data_t').

Mohammad Akhlaghi <makhlaghi>
Project Administrator
Tue 02 Jun 2020 09:35:33 PM UTC, original submission:  

The calculation of reverse sip coefficients is done in task #15669. Now we have to calculate reverse coefficients which is done by fitting a polynomial on a two-dimensional matrix populated with forward coefficients.

So essentially reverse coefficients are an approximation of forward coefficients as discussed in task #15128 comment #23.

This task is a subtask of task #15128.

Sachin Kumar Singh <sks_15>
Project MemberIn charge of this item.


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Posted a comment)
  • -email is unavailable- added by sks_15 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-06-05 makhlaghi Percent Complete20% => 100%
    2020-06-05 sks_15 Should be Finished on2020-06-02 => 2020-06-05
        StatusIn Progress => Done
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5