Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "new" Bool data type #262

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Add "new" Bool data type #262

merged 2 commits into from
Mar 12, 2024

Conversation

Chocrates
Copy link
Contributor

@Chocrates Chocrates commented Jul 23, 2023

I am trying to play with JWST data with this library and have run into an error. Note I know almost nothing about FITS, just what I can grok from the Wiki page and selected reading in the spec and other places.

With this small code:

use fitsio::FitsFile;

fn main() {
    let filename = String::from("/home/chris/Downloads/MAST_2023-07-19T1303/JWST/jw02731-o001_t017_nircam_clear-f090w/jw02731-o001_t017_nircam_clear-f090w_i2d.fits");
    let mut fptr = FitsFile::open(filename).unwrap();

    fptr.pretty_print().expect("oops");
}

I am getting this error:

thread 'main' panicked at 'Have not implemented str -> ColumnDataType for L'

So it appears that the JWST data has a table data type that we don't expect. Looking at the astropy site for data table types (I have not been successful so far finding the table data types in the official docs) it lists the L format as a Boolean.
Making that change, compiling and sourcing this library from the locally compiled library allows me to pretty print the FITS file.

Any idea what is going on? I doubt my change is the correct thing to do since in our tables.rs it is listing Booleans as B data type.

You can find the JWST files on the MAST site using this query if you are interested (about 20gb of data for all of them)

@coveralls
Copy link

coveralls commented Jul 23, 2023

Coverage Status

coverage: 77.393% (-0.07%) from 77.464%
when pulling 0baec0f on Chocrates:main
into 9f516d5 on simonrw:main.

@Chocrates Chocrates marked this pull request as ready for review July 24, 2023 15:40
@simonrw
Copy link
Owner

simonrw commented Mar 12, 2024

Hi, sorry for the late response, I didn't see this PR fly by 🤦

I am happy to merge this change if the fix works for you. I won't be releasing a new version of the crate any time soon, so you will have to add fitsio as a git dependency for now.

@simonrw simonrw enabled auto-merge March 12, 2024 16:13
@simonrw simonrw merged commit c20f18e into simonrw:main Mar 12, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants