INDISK/FITS 07-JUL-1998 KB Purpose: Read FITS files from disk and convert to Midas format. Syntax: INDISK/FITS in_files [out_spec] [option] [check_flag] in_files = filename(s) of FITS files separated by a comma; or name of ASCII file (indicated by filetype `.cat') which contains a FITS filename on each line; also wildcard characters are supported. out_spec = corresponding MIDAS filenames separated by a comma; or name of ASCII file (indicated by filetype `.cat') with a corresponding Midas filename on each line or name of Midas catalog (also indicated by filetype `.cat') with names; or string "ROOT=abcd" to build output file names as abcd0001.TYPE, abcd0002.TYPE, ... with TYPE is "bdf", "tbl" or "fit" depending on type of FITS file; if the param `out_spec' is omitted, output names are built as toto0001.TYPE, toto0002.TYPE, ... option = OC or ON to keep the original name of the files, i.e if the result files will be named according to the FITS keyword FILENAME, so we also execute RESTORE/NAME OC - with overwrite confirmation, ON - without confirmation = NO for using a name as specified in param `out_spec'; defaulted to NO check_flag = to check the root_string in the option ROOT=... above 2 char.flag, (display_flag + action_flag) display_flag = Y(es) or N(o) (only if bad chars. found) action_flag = S(top), R(eplace) or C(ontinue) with respect to dangerous characters in the root string, defaulted to: YR (bad chars are replaced by `_') See also: INTAPE/FITS, INDISK/ASCII, OUTDISK/FITS, OUTTAPE/FITS, RESTORE/NAME [Filename] Note: If not as many output file names as input names are given, the names `toto0001.TYPE', `toto0002.TYPE', ... are used. The command works for images, tables and fitfiles. Examples: INDISK/FITS xyz Convert FITS file `xyz' to `toto0001.bdf' or `toto0001.tbl' or `toto0001.fit' depending upon if `xyz' was an image, table or fit file. INDISK/FITS tst0003.mt prado.midas Convert FITS file `tst0003.mt' to `prado.midas' INDISK/FITS tst0004.mt ? OC Assuming that the FITS file `tst0004.mt' has a char. FITS keyword named FILENAME containing `vieux_port.bdf' convert FITS file `tst0004.mt' to MIDAS file `vieux_port.bdf'. If a file named `vieux_port.bdf' already exist, ask for confirmation before overwriting it. INDISK/FITS paradis.cat paradis.out Read ASCII file `paradis.cat' and convert the FITS files with names in that file to MIDAS files with the corresponding names in file `paradis.out' INDISK/FITS paradis.cat ? ON Read ASCII file `paradis.cat' and convert the FITS files with names in that file to MIDAS files with names as descr. FILENAME of the FITS input files (will usually be the same as the physical filename...).in INDISK/FITS luminy*,canebiere.fits panier.dat Convert all FITS files matching the pattern `luminy*' as well as file `canebiere.fits' to MIDAS files with names according to the entries in ASCII file `panier.dat' INDISK/FITS luminy*,canebiere.fits ROOT=cassis As above but names of MIDAS files will be built as `cassis0001.bdf', `cassis0002.bdf', ... INDISK/FITS luminy*,canebiere.fits ROOT=cas@sis As above but `cas@sis0001.bdf' is a bad MIDAS filename, therefore a warning message will be displayed and names will be built as `cas_sis0001.bdf', `cas_sis0002.bdf', ... Midas 003> help intape/fits INTAPE/FITS 16-MAR-2000 PJG Purpose: Read image frames from magtape or disk in FITS format. Syntax: INTAPE/FITS file_specs file_id device [flags] files_specs = numbers of frames as stored on tape in ascending order, e.g. 2,17,22-33,44 specifies frames 2,17,22 till 33,44 file_id = file identification (max. 4 chars), to this string the file no. on tape is appended, e.g. file no. 17 will be stored in file_id0017.bdf device = logical tape unit (e.g. TAPE1), physical tape unit (e.g. /dev/nrst8 or host:/dev/nrst1) or prefix of file name on disk. For disk files the extension .mt is assumed. It is also possible to specify a full file name with extension in which case the data are taken from it. flag = 3-character flag: list, create, keyword list flag: F(ull), S(hort), N(one) create flag: N(o create), O(original format), F(loating point format) keyword flag: Y(es history stored), N(o history stored), C(ode hierarchical keywords) or A(ll keywords stored also with empty data matrix) Default flags are SOY See also: OUTTAPE/FITS, INDISK/FITS, RESTORE/NAME, CREATE/xCAT, SET/xCAT Note: The input tape must be loaded on a tape unit before executing the command. All terminal output is stored in the MIDAS logfile as well. To access remote tape drives, the MIDAS tapeserver demon must be installed and run on the host in question. A listing of file headers can be made by using the flags FNN For FITS format, only the descriptor elements corresponding to FITS keywords are created. Thus, some elements (e.g. in O_TIME) may not be initiated. When the keyword flag 'C' is used, hierarchical FITS keywords are coded into a 15 char. MIDAS descriptor name for backwards compatibility. By default, these keywords become a long MIDAS descriptor name with '.' separating the different levels. Some FITS files containing e.g. IMAGE extensions may start with a prime FITS header with interesting keywords but with no associated data matrix. By default, such empty data files will not be created. If you wish to force the creation of such files with only header information, the history option 'A' can be used. If a FITS file has extensions, e.g. an image file with a binary table as next extension, as many Midas frames as extensions are created. The 4th element of the Midas keyword MID$INFO, (i.e. MID$INFO(4)) is set to the no. of Midas frames created by INTAPE/FITS. When a physical device name is used, it MUST specify a none-rewinding device (e.g. /dev/nrst3) for this command to work correctly. The operating system may itself rewind the tape if a rewinding device is given. Examples: INTAPE/FITS 1-15 ccd TAPE0 Read image frames no. 1 through 15 on the tape mounted on unit TAPE0 and store them into frames `ccd0001.bdf' to `ccd0015.bdf'. INTAPE/FITS * x /dev/nrst8 FNN List headers of all files from magtape mounted on the local tape unit /dev/nrst8. INTAPE/FITS * x obs:/dev/nrst8 FNN List headers of all files from magtape mounted on the tape unit /dev/nrst8 on host 'obs'. NOTE: MIDAS tape server must run on this host. INTAPE/FITS 1-2 data image Read from file `image0001.mt' and `image0002.mt' creating the frames `data0001.bdf' and `data0002.bdf' (assuming the FITS files are of type IMAGE). INTAPE/FITS 1 gal galaxy.fits Read from file `galaxy.fits' and assuming the FITS file consists of an image and a binary table extension, create the Midas frames `gal0001.bdf' and `gal0001.tbl'. The keyword MID$INFO(4) will be set to 2. INTAPE/FITS 1 xxx FORSbadpix.tfits Read from FITS file `FORSbadpix.tfits' and create the Midas frame `xxx0001.tbl' (assuming the FITS file is of type TABLE).