Full Name: | herschel.ia.toolbox.util.SimpleFitsWriterTask |
Alias: | simpleFitsWriter |
Type: | Java Task -
![]() |
Import: | from herschel.ia.toolbox.util import SimpleFitsWriterTask |
Category |
Saves a product in a FITS file.
SimpleFitsWriterTask flow:
if no filename is given, flow is finished with RuntimeException "File is required."
if the file already exists and warn is checked: user is asked to confirm overwriting
if the user does not confirm overwriting (or mode is not interactive), flow is finished with RuntimeException "Execution cancelled."
if the user asked for compression, the output will be compressed
Otherwise the product or dataset (wrapped) is saved in HCSS' FITS format in the chosen file
To read FITS files use fitsReader
(SimpleFitsReader
is quite limited).
Example 1: Saving a product into a file | ||
---|---|---|
|
Example 2: Saving a product into a file asking before overwriting | ||
---|---|---|
|
Example 3: Saving a product into a zipped file | ||
---|---|---|
|
Jython Syntax |
---|
|
SimpleFitsReader does not support zipped fits. SimpleFitsWriter allows it for compatibility with external tools.
Annotatable product
[INPUT, MANDATORY, default=null]
|
|
---|---|
Product or Dataset to be saved. Will not accept Contexts. |
String file
[INPUT, MANDATORY, default=null]
|
|
---|---|
FITS filename to save the product into. |
Boolean warn
[INPUT, OPTIONAL, default=False]
|
|
---|---|
If true, asks confirmation before overwriting. |
String compression
[INPUT, OPTIONAL, default="NONE"]
|
|
---|---|
The type of compression in the output file. Valid values are "NONE", "ZIP" and "GZIP" |