How to make use of the products of jointcal?

Hello,
Recently, I had processed the following steps and went on jointcal to see if the preliminary wcs get by singleFrame has been modified by jointcal, (since I didn’t care about photometry, so I didn’t apply fgcm, after doing the jointcal, I have several folder:

jointcal_config
jointcal_log
jointcal_metadata
jointcalSkyWcsCatalog
metricvalue_jointcal_astrometry_collected_refStars
metricvalue_jointcal_astrometry_final_chi2
metricvalue_jointcal_astrometry_final_ndof
metricvalue_jointcal_astrometry_matched_fittedStars
metricvalue_jointcal_astrometry_prepared_ccdImages
metricvalue_jointcal_astrometry_prepared_fittedStars
metricvalue_jointcal_astrometry_prepared_refStars
packages

I guess the refine wcs is in the folder jointcalSkyWcsCatalog, but I didn’t see anything related to astrometryVisitOrder, which may looks something like wcsFitter.order? how can I make use of the prodects of jointcal if I want to see the difference between the wcs after jointcal and the wcs I add to the image, for example, like drawing a residuals picture with the calexp’s header:

CD1_1   = -9.16667771595781E-05 / Transformation matrix element                 
CD1_2   = 5.15526544546508E-09 / Transformation matrix element                  
CD2_1   = 5.56227633542663E-09 / Transformation matrix element                  
CD2_2   = 9.16673178574373E-05 / Transformation matrix element                  
RADESYS = 'ICRS    '           / Reference frame for RA/DEC values              
A_0_2   = -9.80673267324552E-10 / SIP forward distortion coeff                  
A_0_3   = -2.72980865075959E-13 / SIP forward distortion coeff                  
A_1_1   = 5.54550997892483E-11 / SIP forward distortion coeff                   
A_1_2   = -3.18339889442891E-13 / SIP forward distortion coeff                  
A_2_0   = 2.32882766104403E-10 / SIP forward distortion coeff                   
A_2_1   = 3.80937173253727E-13 / SIP forward distortion coeff                   
A_3_0   = -9.76192978252609E-14 / SIP forward distortion coeff                  
A_ORDER =                    3 / SIP max order                                  
B_0_2   = -1.2288963642008E-09 / SIP forward distortion coeff                   
B_0_3   = -4.97481033104037E-13 / SIP forward distortion coeff                  
B_1_1   = 1.06961533038474E-09 / SIP forward distortion coeff                   
B_1_2   = -5.41377016266849E-14 / SIP forward distortion coeff                  
B_2_0   = 1.17817861744078E-09 / SIP forward distortion coeff                   
B_2_1   = 1.36771340654977E-13 / SIP forward distortion coeff                   
B_3_0   =  3.1221673094437E-14 / SIP forward distortion coeff                   
B_ORDER =                    3 / SIP max order                                  

Thank you

The fitted WCS from jointcal is a completely different functional form from that of the single frame fitter. If you wish to compare them, your best approach would be to run wcs.pixelToSky on a grid of points on the image for the two WCSs you want to compare, and then plot the differences of those on-sky coordinates.

My question is how to make use of the prodects of jointcal(for example get a python object them) and then can run the code like wcs.pixelToSky :smiling_face_with_tear:
Thank you!

If you read the dataset with the butler (via butler.get("jointcalSkyWcsCatalog", visit=VISIT, tract=TRACT), you will get an ExposureCatalogthat contains theSkyWcs` for each detector, indexed on the detector id.