Creating Fits FilesΒΆ
At any point in the Virtual Pipeline you can store the val
with
- 3D (x, y, wav)
SyntheticCube
- 2D (x, y)
SyntheticImage
dimension of the different FC_objects, respectivly, in a fits file (e.g. output.fits
).
For a 3D SyntheticCube
, add to you script:
from astropy.io import fits
# store FC_object.val in fits file
fits.writeto('output.fits', FC_object.val.swapaxes(0, 2).swapaxes(1, 2),
clobber=True)
In this case you will find the file output.fits
in the same directory as example.py
.
If you extend the example described in SyntheticCube, the file will be exactly the same like thehere
.
For a 2D SyntheticImage
, add to you script:
from astropy.io import fits
# store FC_object.val in fits file
fits.writeto('output.fits', FC_object.val, clobber=True)