Comments (3)
Confirmed that it appears to be a problem.
The file MIRI-TN-00070-ATC_Imager_distortion_CDP_Iss5.pdf
contains a table on page 5 that has V2/V3 and MIRI SCA pixels.
To create the data file I took the jw93065001002_02105_00001_mirimage_rate.fits
, modified the header field NUMDTHPT
to be a string '0' rather than an integer 0 (as the schema appears to want a string), and I added in the refs:
In [16]: f[0].header['V2_REF'] = -453.5134
In [21]: f[0].header['V3_REF'] = -72.0545718428
In [18]: f[0].header['RA_REF'] = 5.6
In [19]: f[0].header['DEC_REF'] = -13.5
In [20]: f[0].header['ROLL_REF'] = 337.125305
based on comments from Nadia.
I ran the assign_wcs and read in the resulting WCS transform.
In [27]: from jwst.datamodels import ImageModel
In [28]: a = ImageModel('jw93065001002_02105_00001_mirimage_rate_assign_wcs.fits')
In [31]: a.meta.wcs
In [35]: tt = a.meta.wcs.get_transform('detector', 'v2v3')
In [36]: tt(900., 700.)
Out[36]: (-1.9431383255402122, -7.91479684787932)
On page 5 of the PDF file, it does say the v2 should be -8.0 and the V3 should be -2.0. So, it does appear that the outputs are swapped.
from jwst.
I looked at just the distortion file itself and it seems to be the source of the problem:
In [50]: a = AsdfFile.open('/grp/crds/cache/references/jwst/jwst_miri_distortion_0007.asdf')
In [51]: a.tree['model']
Out[51]: <CompoundModel54(c0_0=-12.774999618530273, c1_0=0.02499999850988388, c0_1=-12.774999618530273, c1_1=0.02500000037252903, c0_0_3=0.0002779261558316648, c1_0_3=1.385405812470708e-05, c2_0_3=-0.0008357166079804301, c3_0_3=-1.0612609457893996e-07, c4_0_3=4.864141942562128e-07, c0_1_3=2.8437325954437256, c0_2_3=0.00011153987725265324, c0_3_3=-0.00011824401735793799, c0_4_3=3.311309228593018e-06, c1_1_3=-1.815903488022741e-05, c1_2_3=1.067891275852162e-06, c1_3_3=-2.590377050637471e-07, c2_1_3=-6.579341425094754e-05, c2_2_3=3.2994903449434787e-06, c3_1_3=1.7919234096552827e-07, c0_0_4=6.470080734288786e-06, c1_0_4=2.822078227996826, c2_0_4=-2.873002813430503e-05, c3_0_4=2.439489207972656e-06, c4_0_4=1.5976526412941894e-07, c0_1_4=-0.00020063390547875315, c0_2_4=2.4326425773324445e-05, c0_3_4=2.189153519793763e-06, c0_4_4=-2.4686968913556484e-07, c1_1_4=-0.0016774788964539766, c1_2_4=-3.3127689675893635e-05, c1_3_4=2.2623519271292025e-06, c2_1_4=1.9835767943732208e-06, c2_2_4=-1.9065278422658594e-07, c3_1_4=1.81334576154768e-06, c0_0_6=-1.5400006771087646, c1_0_6=-0.026083583012223244, c0_1_6=-0.0020299148745834827, c0_0_7=-7.228002071380615, c1_0_7=0.0020299144089221954, c0_1_7=-0.026083586737513542)>
In [53]: a.tree['model'](945,728)
Out[53]: (-2.0008591851076445, -7.99326608345772)
So, after talking to @nden I decided that I should just change the script that creates the distortion file.
from jwst.
This ticket is fixed primarily by spacetelescope/jwreftools#13 and then a small bit of code cleanup and fixing were done in #365 . So once those two are merged then this ticket can be closed.
from jwst.
Related Issues (20)
- Error in ApCorr propagation to variances HOT 2
- Background error propagation in non-IFU background subtraction HOT 2
- Add group_id to Level 3 associations HOT 2
- Investigate refpix differences across systems
- Investigate coron3 differences across systems
- Nod Flux oversubtraction correction for NIRSpec Fixed-Slit and MOS point-source spectra
- Move NIRSpec FS point source position assignment out of wavecorr HOT 2
- Spec3 step mrs_imatch crashing HOT 1
- extract_1d SOSS ATOCA failures on saturated data HOT 3
- Remove drizpars handling from resample steps HOT 3
- Flux differences in stage 3 products when combining multiple grating/filters HOT 1
- Improve runtime of NSClean step HOT 4
- Modify NSClean behaviour for subarray data HOT 3
- Ensure NaN values are excluded from sum in spectral extraction
- Remove "R_DRZPAR" definition from datamodels schema HOT 1
- Improve NIRSpec spec2 runtime for BOTS/MOS HOT 15
- Update the JWST pipeline to accommodate the new likelihood algorithm in ramp fitting
- Error in NIRSpec spectral WCS with all-NaN input to resample HOT 1
- Bug in extract1d._coalesce_bounds HOT 1
- extract1d._coalesce_bounds can return unexpected results HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jwst.