Export FITS with custom metadata

Does anyone have experience exporting data as a file FITSwith custom metadata information ( FITS)? So far, I have managed to generate files FITSwith the standard Mathematica header template FITS. The documentation does not mention whether custom export of metadata is supported and how this can be done.

The following suggestions from comp.soft-sys.math.mathematica do not work:

header=Import[<some FITS file>, "Metadata"]; 
Export<"test.fits",data ,"Metadata"->header] 

or

Export["test.fits",{"Data"->data,"Metadata"->header}]

What is the correct way to export my own metadata to a file FITS?

Greetings

Marcus

Update: Answer from Wolfram support: "Mathematica does not yet support the export of metadata for the FITS file. An example relates to the import of this data. We plan to support this in the future ..." "It is also planned to include binary tables in the import of FITS functionality."

I will try to find a workaround.

+5
source share
2 answers

According to the documentation for v.7 and v.8, there are several ways to accomplish what you want, and you almost have the correct rule:

Export["test.fits", {"Data" -> data, "Metadata" -> header}, "Rules"]

Other ways are

Export["test.fits", header, "Metadata"]
Export["test.fits", {data, header}, {{"Data", "Metadata"}}]

note the double brackets around the element labels in the second method.

. - @belisarius, "", , , . , "RawData". , : , . , , , Mathematica. -, , "" . , v.6 , .

0

Mathematica 9 (), . "FITS", , ( Export, Import ).

0

All Articles