Source code for starlink.convert

"""
Runs commands from the Starlink CONVERT package.

Autogenerated from the starlink .hlp and .ifl files,
by starlink-pywrapper/helperscripts/generate_functions.py.

Starlink version: 2018A
b6ca36bf8884802759017298539489d11795861e (2018-07-06 09:36:39)
"""

from . import wrapper


[docs]def ascii2ndf(in_, out, **kwargs): """ Converts a text file to an NDF. Runs the command: $CONVERT_DIR/ascii2ndf . Arguments --------- `in_` : str,filename ASCII file out : str,filename Output NDF data structure Keyword Arguments ----------------- comp : str Array component to copy from the ASCII file ["Data"] skip : int Number of records to skip [0] shape : int Shape of the output NDF type : str Interim data type required [dyn.] fits : bool Read a FITS header from the ASCII file? [FALSE] maxlen : int Maximum length in bytes of text-file records [512] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_ASCII2NDF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ascii2ndf", "ascii2ndf", in_, out, **kwargs)
[docs]def ast2ndf(*args, **kwargs): """ Converts an Asterix data cube into a simple NDF. Runs the command: $CONVERT_DIR/ast2ndf . Keyword Arguments ----------------- `in_` : str input Asterix file: out : str,filename output cube: Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_AST2NDF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ast2ndf", "ast2ndf", *args, **kwargs)
[docs]def da2ndf(in_, out, **kwargs): """ Converts a direct-access unformatted file to an NDF. Runs the command: $CONVERT_DIR/da2ndf . Arguments --------- `in_` : str,filename Direct-access unformatted file out : str,filename Output NDF data structure Keyword Arguments ----------------- comp : str Array component to copy from the unformatted file ["Data"] noperec : int Number of data values per unformatted record shape : int Shape of the output NDF type : str NDF data type required [dyn.] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_DA2NDF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/da2ndf", "da2ndf", in_, out, **kwargs)
[docs]def dst2ndf(in_, out, **kwargs): """ Converts a Figaro (Version 2) DST file to an NDF. Runs the command: $CONVERT_DIR/dst2ndf . Arguments --------- `in_` : str Name of Figaro (.DST) file to be converted out : str,filename Name of output NDF Keyword Arguments ----------------- form : str Storage form of the NDF data and variance arrays ["Simple"] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_DST2NDF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/dst2ndf", "dst2ndf", in_, out, **kwargs)
[docs]def fits2ndf(in_, out, **kwargs): """ Converts FITS files into NDFs. Runs the command: $CONVERT_DIR/fits2ndf . Arguments --------- `in_` : str Input FITS file(s) out : str Output NDF data structure(s) Keyword Arguments ----------------- fmtcnv : str Apply BSCALE and BZERO to data values in the FITS file(s)? ["TRUE"] logfile : str,filename Filename to store FITS headers [!] container : bool Create a container file? [FALSE] encodings : str FITS keywords to use when creating NDF WCS components [!] extable : str,filename Table of extension specifiers [!] proexts : bool Propagate the extensions of the FITS file? [TRUE] profits : bool Create a NDF extension called FITS to store the headers? [TRUE] type : str HDS data type of NDF [!] wcsattrs : str Attributes for WCS conversion [!] wcscomp : str Destination for world c-ordinate information ["WCS"] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_FITS2NDF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/fits2ndf", "fits2ndf", in_, out, **kwargs)
[docs]def ircam2ndf(in_, prefix, obs, **kwargs): """ Converts an IRCAM data file to a series of NDFs. Runs the command: $CONVERT_DIR/ircam2ndf . Arguments --------- `in_` : IRCAM Name of IRCAM file to be converted prefix : str Data-array configuration to copy [STARE] obs : List[str] List of observations to convert [*] Keyword Arguments ----------------- config : str Data-array configuration to copy ["STARE"] fmtcnv : bool Apply non-null scale and zero? [FALSE] out : str,filename Name of output NDF Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_IRCAM2NDF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ircam2ndf", "ircam2ndf", in_, prefix, obs, **kwargs)
[docs]def ndf2ascii(in_, out, **kwargs): """ Converts an NDF to a text file. Runs the command: $CONVERT_DIR/ndf2ascii . Arguments --------- `in_` : str,filename Input NDF data structure out : str,filename ASCII file Keyword Arguments ----------------- comp : str Array component to copy to the ASCII file ["Data"] reclen : int Maximum recordsize of the ASCII file. [dyn.] fits : bool Write a FITS header in the ASCII file? [FALSE] fixed : bool Fixed format of the array values? [FALSE] noperec : int Number of data values per ASCII record Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2ASCII for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ndf2ascii", "ndf2ascii", in_, out, **kwargs)
[docs]def ndf2da(in_, out, **kwargs): """ Converts an NDF to a direct-access unformatted file. Runs the command: $CONVERT_DIR/ndf2da . Arguments --------- `in_` : str,filename Input NDF data structure out : str,filename Unformatted direct-access file Keyword Arguments ----------------- comp : str Array component to copy to the unformatted file ["Data"] noperec : int Number of data values per output record [dyn.] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2DA for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ndf2da", "ndf2da", in_, out, **kwargs)
[docs]def ndf2dst(in_, out, **kwargs): """ Converts an NDF to a Figaro (Version 2) DST file. Runs the command: $CONVERT_DIR/ndf2dst . Arguments --------- `in_` : str,filename NDF to be converted out : str Name of output Figaro file Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2DST for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ndf2dst", "ndf2dst", in_, out, **kwargs)
[docs]def ndf2fits(in_, out, **kwargs): """ Converts NDFs into FITS files. Runs the command: $CONVERT_DIR/ndf2fits . Arguments --------- `in_` : str Input NDF data structure(s) out : str Output FITS file(s) Keyword Arguments ----------------- comp : str Array components to copy to the FITS file(s) ["A"] bitpix : str Number of bits per pixel [0] origin : str Origin of the FITS files (for the FITS header) [!] allowtab : bool Permit use of the TAB algorithm of FITS WCS? [TRUE] axisorder : str The order for the WCS axes in the FITS file [!] checksum : bool Write CHECKSUM and DATASUM headers? [TRUE] container : bool Are the input files multi-NDF containers? [FALSE] duplex : bool Merge the NDF FITS airlock in the FITS header for all array components? [FALSE] encoding : str Encoding to use for WCS information ["Auto"] merge : bool Merge the .HEADER NDF with the data NDF? [TRUE] native : bool Include a native WCS encoding in the FITS header? [FALSE] proexts : bool Propagate the NDF extensions? [FALSE] profits : bool Merge the FITS extension of the NDF in the FITS header? [TRUE] prohis : bool Relay any NDF history information to the FITS header? [TRUE] provenance : str Storage of provenance information ["None"] useaxis : bool Should AXIS information be stored in a FITS -TAB table? [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2FITS for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ndf2fits", "ndf2fits", in_, out, **kwargs)
[docs]def ndf2gasp(in_, out, **kwargs): """ Converts a two-dimensional NDF into a GASP image. Runs the command: $CONVERT_DIR/ndf2gasp . Arguments --------- `in_` : str,filename Input NDF image? out : str Output GASP image (.dat suffix not required) Keyword Arguments ----------------- fillbad : int [!] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2GASP for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ndf2gasp", "ndf2gasp", in_, out, **kwargs)
[docs]def ndf2pgm(in_, out, **kwargs): """ Converts an NDF into a PBMPLUS-style PGM-format file. Runs the command: $CONVERT_DIR/ndf2pgm . Arguments --------- `in_` : str,filename NDF to convert out : str PGM filename Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2PGM for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ndf2pgm", "ndf2pgm", in_, out, **kwargs)
[docs]def ndf2tiff(*args, **kwargs): """ Converts an NDF into an 8-bit TIFF-6.0-format file. Runs the command: $CONVERT_DIR/ndf2tiff . Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2TIFF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ndf2tiff", "ndf2tiff", *args, **kwargs)
[docs]def ndf2unf(in_, out, **kwargs): """ Converts an NDF to a sequential unformatted file. Runs the command: $CONVERT_DIR/ndf2unf . Arguments --------- `in_` : str,filename Input NDF data structure out : str,filename Sequential unformatted file Keyword Arguments ----------------- comp : str Array component to copy to the unformatted file ["Data"] noperec : int Number of data values per output record [dyn.] fits : bool Write a FITS header in the unformatted file? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_NDF2UNF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/ndf2unf", "ndf2unf", in_, out, **kwargs)
[docs]def specx2ndf(*args, **kwargs): """ Converts a SPECX map into a simple data cube, or SPECX data files Runs the command: $CONVERT_DIR/specx2ndf . Keyword Arguments ----------------- `in_` : str,filename Input SPECX map out : str,filename Output NDF cube gridfile : str Map schematic file [!] telescope : str Telescope ["JCMT"] latitude : str Geodetic (geographic) latitude of telescope ["19:49:33"] longitude : str Geodetic (geographic) longitude of telescope ["155:28:47"] axis : bool Create AXIS structures? [FALSE] system : str Celestial co-ordinate system for output cube ["RJ"] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_SPECX2NDF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/specx2ndf", "specx2ndf", *args, **kwargs)
[docs]def unf2ndf(in_, out, **kwargs): """ Converts a sequential unformatted file to an NDF. Runs the command: $CONVERT_DIR/unf2ndf . Arguments --------- `in_` : str,filename Sequential unformatted file out : str,filename Output NDF data structure Keyword Arguments ----------------- comp : str Array component to copy from the unformatted file ["Data"] noperec : int Number of data values per unformatted record skip : int Number of records to skip [0] shape : int Shape of the output NDF type : str NDF data type required [dyn.] fits : bool Read a FITS header from the unformatted file? [FALSE] Notes ----- See http://www.starlink.ac.uk/cgi-bin/htxserver/sun55.htx/sun55.html?xref_UNF2NDF for full documentation of this command in the latest Starlink release """ return wrapper.starcomm("$CONVERT_DIR/unf2ndf", "unf2ndf", in_, out, **kwargs)