Open zkbt opened 2 years ago
Hey @zkbt, this is from the pipeline, and not the simulated data. Specifically, see line 2863 in the extract1d/extract.py file in the JWST pipeline python package. It seems like there's also instances in the ifu.py file (line 186-193) under the same subdirectory.
My suggestion would be to make a JWST Help Desk request and outline why switching to an astropy compatible unit would be better. I suppose you could also just submit a pull request to the Github (https://github.com/spacetelescope/jwst), but I don't know how open they are to that.
This might be a super fussy and unimportant thing, but I figured I'd bring it up.
While reading a Stage 2
x1dints
file, I’m trying to be clever by assigning astropy units according to what’s listed in the FITS ‘unit’ associated with each column. This complains forname = 'SB_VAR_POISSON'; format = 'D'; unit = '(MJy/sr)^2'
which seems like a reasonable variance unit, if its being compared to a quantity in MJy/sr, but the astropyUnit
can’t parse that string. A simple example of how this breaks:I think I have a workaround for my own code trying to do this, but just defining a custom unit with
But, maybe it'd simplify things for other folks if these units could be directly parsed into astropy. So, my questions:
'MJy^2/sr^2'
?