Comments (3)
I went through these to see where the issues are. I created a branch https://github.com/brechmos-stsci/jwst/tree/74_datamodel_tests where I made the changes. I am not going to create a PR at this point.
Below are things that will need to be discussed at some point ( @nden ). Not today :-)
test_extra_fits()
Not sure if this is what was happening previously. Are these causing the failures?
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: 'N/A' is not valid in keyword 'CONT_ID'
warnings.warn(msgfmt.format(result, fits_keyword))
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: '2011-06-17T02:00:54.193000' is not valid in keyword 'EXPSTART'
warnings.warn(msgfmt.format(result, fits_keyword))
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: '2011-06-17T02:00:54.193000' is not valid in keyword 'EXPMID'
warnings.warn(msgfmt.format(result, fits_keyword))
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: '2011-06-17T02:07:56.405000' is not valid in keyword 'EXPEND'
warnings.warn(msgfmt.format(result, fits_keyword))
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: 'fast' is not valid in keyword 'READPATT'
warnings.warn(msgfmt.format(result, fits_keyword))
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: '1' is not valid in keyword 'NUMDTHPT'
warnings.warn(msgfmt.format(result, fits_keyword))
WARNING: VerifyWarning: Card is too long, comment will be truncated. [astropy.io.fits.card]
test_extra_fits_update()
Not sure if this is what was happening previously. Are these causing the failures?
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: 'N/A' is not valid in keyword 'CONT_ID'
warnings.warn(msgfmt.format(result, fits_keyword))
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: '2011-06-17T02:00:54.193000' is not valid in keyword 'EXPSTART'
warnings.warn(msgfmt.format(result, fits_keyword))
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: '2011-06-17T02:00:54.193000' is not valid in keyword 'EXPMID'
warnings.warn(msgfmt.format(result, fits_keyword))
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: '2011-06-17T02:07:56.405000' is not valid in keyword 'EXPEND'
warnings.warn(msgfmt.format(result, fits_keyword))
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: 'fast' is not valid in keyword 'READPATT'
warnings.warn(msgfmt.format(result, fits_keyword))
/Users/crjones/Documents/JWST/jwst/jwst/datamodels/fits_support.py:494: UserWarning: '1' is not valid in keyword 'NUMDTHPT'
warnings.warn(msgfmt.format(result, fits_keyword))
test_schema.test_date()
The date is supposed to be a string (at least according to the schema). I added a date validation check in properties.__setattr__
to make sure the date makes sense by calling dateutil.parser.parse
. This now properly returns a ValidationError if it is not correct.
test_schema.test_date2()
I changed the check to see if it is a string as the schema appears to want a string.
test_schema.test_list2()
This seems to be fine when I run it from within my python environment.
test_schema.test_multislit_garbage()
This seems to be fine when I run it from within my python environment.
test_wcs.test_wcs()
This seems to be working too, now. There are some warnings but I think they are all right.
In [14]: test_wcs()
WARNING: FITSFixedWarning: The WCS transformation has more axes (2) than the image it is associated with (0) [astropy.wcs.wcs]
WARNING: Some non-standard WCS keywords were excluded: B_0_3, A_1_1, B_ORDER, BP_0_2, A_1_2, A_3_0, B_0_2, AP_0_1, AP_ORDER, BP_2_0, A_ORDER, BP_1_2, AP_0_3, AP_2_0, B_1_1, BP_3_0, B_1_2, AP_3_0, A_2_0, BP_1_1, AP_2_1, BP_0_3, BP_0_1, B_3_0, AP_1_2, BP_ORDER, A_0_2, AP_1_0, AP_0_2, BP_1_0, BP_2_1, AP_1_1, B_2_0, B_2_1, A_2_1, A_0_3 Use the ``relax`` kwarg to control this. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: The WCS transformation has more axes (2) than the image it is associated with (0) [astropy.wcs.wcs]
Note: There is one line that I needed to comment out as the CRPIX1 is not in the extra_fits.PRIMARY.header. Not sure why on that one.
from jwst.
All of the UserWarnings from fits_support.py are simply due to the fact that we've changed the expected data types and/or contents of several header keywords since the .fits file being used in the test was created (which is likely many years ago already).
CONT_ID must now be an integer
EXPSTART, EXPMID, and EXPEND must now be floats (in units of MJD)
NUMDTHPT must now be a string (e.g. '1' instead of the integer 1)
READPATT: still a string, but allowed values can be found in core.schema.yaml. FAST is one of the allowed values, but I'm wondering if it's case sensitive?
Simply updating these keyword values in the test .fits file will make the warnings go away.
from jwst.
This was fixed at some point in build 7.
from jwst.
Related Issues (20)
- Implement a ModelLibrary subclass for jwst
- Allow and mandate teams to link their paper(s) on their proposal HOT 2
- Link to JDox from jwst github and readthedocs HOT 2
- MRS 1d residual fringe correction can fail due to bright emission lines HOT 1
- Remove jwst/fits_generator
- Add new read pattern to schema HOT 1
- NIRSPEC dark parallel error for program 6634 HOT 2
- numpy version 2.0.1 not compatible with jwst.pipeline.Detector1Pipeline HOT 1
- High memory usage for Detector1Pipeline HOT 4
- Memory Leaks in Detector1Pipeline HOT 7
- Clean up unnecessary copies HOT 2
- Emicorr NaNs data for low ngroups HOT 2
- Jump step refactoring HOT 9
- Memory leak in OLS_C ramp fitting
- JWST to send calibration version to CRDS for context setting, under DR paradigm
- Train TAC model (Tso/Ami/Coron)
- Refactor model_blender to take in only necessary metadata
- NIRSpec TSO filenames may be missing the slitname HOT 1
- cibuildwheel fails for python 3.13
- Enable python 3.13 wheels when python 3.13 support is added HOT 1
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.