Comments (5)
@nden and I talked about the ticket and this is my understanding (which might need to be modified).
Problem Definition
All the transforms in assign_wcs, for NIRSPEC, expect the wavelength data to be in meters, which it is currently. The output wavelength dataset is expected to be in microns, which it isn't (hence the ticket). So, I need to come up with a way to convert the wavelength units from meters to microns.
Possible Solutions
@nden and I discussed two possible methods:
- Add a transform using Identity and Constant so it would be something like:
(ra, dec, lambda) | Mapping(0,1,2,2) & Identity(2) * ( Identity(1) * Constant(10^6))
The problem is the inverse transform may take some work given the number of inputs is different.
- Extend the Affine() Transform to move from 2D to 3D (or add a 3D)
We could put it in jwst.transforms for now and it could be built primarily for this purpose. In this case we would need to create an Affine3D in which the diagonal would be (1, 1, 10^6). I would also have to look at the inverse transform and we would have to be careful as the inverse transform would still do rotate-translate which is not the inverse of rotate-translate.
Solution Direction
@nden and I talked and 2. might be the better option as it would be cleaner.
In either case the change should be incorporated into the v2v3 frame as opposed to adding a new frame only for the wavelength unit conversion.
Testing
To confirm this works I can take any NIRSPEC file, run it through the assign_wcs before and after the changes. The resulting wavelength values should be 10^6 larger once the change is done.
from jwst.
👍
from jwst.
@nden as an aside, given the values have units attached to them is there not a "built-in" unit conversion utility? Would something like that make more sense to pursue as it would be more generally applicable?
I am about 50% done for this ticket either way.
from jwst.
astropy.units
is generally used for unit conversion but models don't work with units yet although they will in the future when one would be able to pass astropy.Quantity
to models. Currently gwcs.coordinate_frame
has a method for attaching units to the output values. In the pipeline for now we need to return results in microns by default.
from jwst.
Fixed in #243. Thanks @brechmos-stsci !
from jwst.
Related Issues (20)
- Dark artifacts in NIRCam cal images from MAST HOT 4
- Spec2 error for NIRISS SOSS full-frame non-TSO exposure HOT 1
- No data on NRS2 for NRS_MSASPEC with Prism HOT 2
- Refpix output array math incompatible with numpy 2.0
- `test_coron` failures with numpy 2.0
- JWST issues with numpy 2.0
- calwebb_tso3 failures for SOSS data in FULL subarray HOT 1
- Assess performance of new self-calibrated bad pixel mask
- NSClean Step is not run on background and imprint observations
- tweakreg to stcal
- Outlier detection arguments documentation out-of-date
- Ramp fitting runtime in RN variance calculation
- Make "OLS_C" the default algorithm for ramp fitting HOT 2
- jwst 1.14.1 patch release HOT 1
- Consider saving intermediate product for WFSS processing in MAST HOT 1
- Resample parameters in outlier detection don't have same limits as in resample
- Add regression test for MIRI emicorr step HOT 1
- Implement pipeline changes necessary to work with data-release style processing HOT 1
- Remove python implementation of OLS ramp fitting HOT 2
- CR showers code excessive flagging in MRS bright sources HOT 2
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.