Next: Table Interfaces
Up: No Title
Previous: Bibliography
Standard Interfaces
Module Version
[3.10]
(17-Jan-1994)
Module SCC
Author: K. Banse, ESO - Garching
Language: C
Classification: MIDAS catalogues
Environment:
- VMS and UNIX
- #include <midas_def.h>
Comments:
This module contains the routines to interact with the catalogs of MIDAS.
The functions provided are:
- Create catalogs (SCCCRE)
- Add and remove entries in catalogs (SCCADD, SCCSUB)
- Find entries and get sequential entries in a catalog (SCCFND, SCCGET)
- Display contents of catalogs (SCCLIS, SCCSHO)
Main arguments used by the routines are:
- catfile
- name of catalog
Function
SCCCRE
SCCCRE(catfile,type,flag)
char *catfile |
IN: catalog file (terminated with `
6#60') |
int type |
IN: type of files to use, same as in SCFCRE |
int flag |
IN: = 1, if file 'dirfile.dat' exists |
- Purpose:Create a catalog.
- Returns:return status (0 = o.k.)
- Algorithm:If flag = 1, read each filename from ASCII file
`dirfile.dat', create an entry for it in the catalog, read relevant
descriptors of each file and
store in catalog file, else create an empty catalog.
Function
SCCADD
SCCADD(catfile,name,ident)
char *catfile |
IN: catalog file |
char *name |
IN: name of frame to be added |
char *ident |
IN: IDENT info of frame to be added |
- Purpose:Add catalog entry.
- Returns:return status (0 = o.k.)
- Algorithm:Add an entry with given name and identification field to the catalog.
Function
SCCSUB
SCCSUB(catfile,name)
char *catfile |
IN: catalog file |
char *name |
IN: name of frame to be removed |
- Purpose:Remove entry with given name from catalog.
- Returns:return status (0 = o.k.)
- Algorithm:Search for given entry and change first 2 chars to '//', which makes
this entry unused.
Function
SCCGET
SCCGET(catfile,flag,name,ident,no)
char *catfile |
IN: catalog file |
int flag |
IN: = 0 for name only, = 1 for name and identifier |
char *name |
OUT: name of frame in next entry of catalog |
char *ident |
OUT: identifier of that frame |
int *no |
IN/OUT: current/next entry no. as input/output |
- Purpose:Get next sequential entry from a catalog
- Returns:return status (0 = o.k.)
- Algorithm:Return name and identifier of next entry in catalog file;
return a blank in name[0], if at EOF.
Parameter `no' has to be set to 0 in the first call of the routine!
Function
SCCLIS
SCCLIS(catfile,intval)
char *catfile |
IN: catalog file |
int intval[2] |
IN: listing interval [low,hi] |
- Purpose:List contents of catalog file.
- Returns:return status (0 = o.k.)
- Algorithm:Read and display catalog, entry by entry.
The listing interval specifies entry no.s of the catalog.
Function
SCCFND
SCCFND(catfile,frmno,frame)
char *catfile |
IN: catalog file |
int frmno |
IN: entry no. in catalog |
char *frame |
OUT: corresponding frame name (terminated by
6#60) |
- Purpose:Find corresponding frame for given entry no.
- Returns:return status (0 = o.k.)
- Algorithm:Search for given entry no. and return connected frame name.
Function
SCCSHO
SCCSHO(catfile,noent,last)
char *catfile |
IN: catalog file |
int *noent |
OUT: no. of entries |
int *last |
OUT: last entry no. |
- Purpose:Show size and type of a catalog
- Returns:return status (0 = o.k.)
- Algorithm:Read and count active entries of catalog.
Module Version
[3.10]
(17-Jan-1994)
Module SCD
Author: K. Banse, ESO - Garching
Language: C
Classification: standard interfaces, descriptors
Environment:
- VMS and UNIX
- #include <midas_def.h>
Comments:
This module contains the routines to interact with the descriptors of MIDAS
frames.
The functions provided are:
- Find descriptors and get information about them (SCDFND, SCDINF)
- Copy and delete descriptors (SCDCOP, SCDDEL)
- Read contents of descriptors (SCDRDC, SCDRDD, SCDRDI, SCDRDR)
- Write contents of descriptors (SCDWRC, SCDWRD, SCDWRI, SCDWRR)
- Read contents of char. descriptors in a simplified way (SCDGETC)
Main arguments used by the routines are:
- imno
- file id of related MIDAS frame
- descr
- name of descriptor, max. 15 chars. long and must begin with an
alphabetic char.
- felem
- first element to be accessed, the very first element is indicated
by 1 (not by 0 as in C-arrays) for compatibility with the relevant
FORTRAN interfaces.
- maxvals
- maximum number of elements required.
- actvals
- actual number of elements accessed, value returned by the
routine.
- unit
- unit of descriptor, currently not implemented - just used as a
placeholder for now.
- null
- no. of null values in descriptor, currently not implemented - just
used as a placeholder for now.
Function
SCDCOP
SCDCOP(from,to,mask,dsc)
int from |
IN: file id of source frame |
int to |
IN: file id of destination frame |
int mask |
IN: copy_mask |
char *dsc |
IN: name of descr. to copy (if mask = 4) |
- Purpose:Copy descriptors from one frame to another.
- Returns:return status ( 0 = o.k. )
- Algorithm:Depending on 'mask' the relevant descriptors are read from the source
frame and written to the destination frame.
- Remarks:Mask for copying:
1 - copy all descriptors,
2 - copy only standard descriptors (cf. Appendix E),
3 - copy all but standard descriptors,
4 - copy single descriptor specified by par. `dsc',
5 - copy all but extended list of standard descriptors
Function
SCDDEL
SCDDEL(imno,descr)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 chars.) |
- Purpose:Delete a descriptor.
- Returns:return status ( 0 = o.k. )
- Algorithm:The descriptor directory is scanned for the specified name and if
found, that name is marked as deleted.
Function
SCDFND
SCDFND(imno,descr,type,noelem,bytelem)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 chars.) |
char *type |
OUT: type of descr - I, R, C, D or ' ' (a blank) |
int *noelem |
OUT: no. of elements |
int *bytelem |
OUT: no. of bytes per element |
- Purpose:Provide info about descriptor `descr'.
- Returns:return status ( 0 = o.k. )
- Algorithm:Search descriptor directory, if `descr' is not found,
*type is set to a blank.
Function
SCDINF
SCDINF(imno,npos,fno,buf,lbuf,numbuf)
int imno |
IN: file id of data frame |
int npos |
IN: position of descriptor, beginning with 1 |
int fno |
IN: specify desired info |
char *buf |
OUT: buffer for character descriptor info |
int lbuf |
IN: max. length of buffer above |
int *numbuf |
OUT: return buffer for numerical data |
- Purpose:Provide info about descriptor at position `npos'.
- Returns:return status ( 0 = o.k. )
- Algorithm:Go through the descriptor directory and provide the desired info.
For `fno' = 1 the name of the descr. is stored into `buf';
for `fno' = 2 the type of the descr. is stored as a char. string in `buf';
for `fno' = 3 the no. of elements of the descriptor is stored in `numbuf'.
Function
SCDGETC
SCDGETC(imno,descr,felem,maxvals,actvals,values)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 chars.) |
int felem |
IN: position of 1st element to be accessed |
int maxvals |
IN: max. no. of characters to be returned |
int *actvals |
OUT: actual no. of characters returned |
char *values |
OUT: array for descriptor data |
- Purpose:Get data from character descriptor and terminate with `
6#60'
(no trailing blanks).
- Returns:return status ( 0 = o.k. )
- Algorithm:Use SCDRDC.
Function
SCDRDC
SCDRDC(imno,descr,noelm,felem,maxvals,actvals,values,unit,null)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 chars.) |
int noelm |
IN: no. of bytes per data value |
int felem |
IN: position of 1st element to be accessed |
int maxvals |
IN: max. no. of values to be returned |
int *actvals |
OUT: actual no. of values returned |
char *values |
OUT: array for descriptor data |
int *unit |
OUT: address of unit pointer |
int *null |
OUT: no. of null values in data |
- Purpose:Read the contents of a character descriptor.
- Returns:return status ( 0 = o.k. )
- Algorithm:`actvals' will be set to the actual no. of values returned.
- Remarks:`noelm' larger than 1 enables you to use character arrays, where
each data value is in effect a char. string of `noelm' bytes.
Function
SCDRDD
SCDRDD(imno,descr,felem,maxvals,actvals,values,unit,null)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 chars.) |
int felem |
IN: position of 1st element to be accessed |
int maxvals |
IN: max. no. of values to be returned |
int *actvals |
OUT: actual no. of values returned |
double *values |
OUT: array for descriptor data |
int *unit |
OUT: address of unit pointer |
int *null |
OUT: no. of null values in data |
- Purpose:Read the contents of a double precision descriptor.
- Returns:return status ( 0 = o.k. )
- Algorithm:`actvals' will be set to the actual no. of values returned.
Function
SCDRDH
SCDRDH(imno,descr,felem,maxvals,actvals,values,totvals)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 chars.) |
int felem |
IN: position of 1st char. in help text to be accessed |
int maxvals |
IN: max. no. of chars. to be returned |
int *actvals |
OUT: actual no. of chars. returned |
char *values |
OUT: buffer for help text |
int *totvals |
OUT: total size of help text |
- Purpose:Read the help text of a descriptor.
- Returns:return status ( 0 = o.k. )
- Algorithm:`actvals' will be set to the actual no. of characters of the help
text returned in `values'.
If no help text exists for the descriptor, `totvals' is set to -1.
Function
SCDRDI
SCDRDI(imno,descr,felem,maxvals,actvals,values,unit,null)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 chars.) |
int felem |
IN: position of 1st element to be accessed |
int maxvals |
IN: max. no. of values to be returned |
int *actvals |
OUT: actual no. of values returned |
int *values |
OUT: array for descriptor data |
int *unit |
OUT: address of unit pointer |
int *null |
OUT: no. of null values in data |
- Purpose:Read the contents of an integer descriptor.
- Returns:return status ( 0 = o.k. )
- Algorithm:`actvals' will be set to the actual no. of values returned.
Function
SCDRDR
SCDRDR(imno,descr,felem,maxvals,actvals,values,unit,null)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 chars.) |
int felem |
IN: position of 1st element to be accessed |
int maxvals |
IN: max. no. of values to be returned |
int *actvals |
OUT: actual no. of values returned |
float *values |
OUT: array for descriptor data |
int *unit |
OUT: address of unit pointer |
int *null |
OUT: no. of null values in data |
- Purpose:Read the contents of a real descriptor.
- Returns:return status ( 0 = o.k. )
- Algorithm:`actvals' will be set to the actual no. of values returned.
Function
SCDWRC
SCDWRC(imno,descr,noelm,values,felem,nval,unit)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 char.) |
int noelm |
IN: no. of bytes per data value |
char *values |
IN: buffer with descriptor data |
int felem |
IN: position of 1st descriptor value to be accessed |
int nval |
IN: no. of data values to write |
int *unit |
IN: unit-pointer |
- Purpose:Write a descriptor and its data.
- Returns:return status ( 0 = o.k. )
- Algorithm:A new descriptor is added to the descriptor area or data of an
existing descriptor is modified and extended, if necessary.
- Remarks:If 'felem' = -1, descriptor values are appended to existing ones.
`noelm' larger than 1 enables you to use character arrays, where
each data value is in effect a char. string of `noelm' bytes.
Function
SCDWRD
SCDWRD(imno,descr,values,felem,nval,unit)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 char.) |
double *values |
IN: buffer with descriptor data |
int felem |
IN: position of 1st descriptor value to be accessed |
int nval |
IN: no. of data values to write |
int *unit |
IN: unit-pointer |
- Purpose:Write a descriptor and its data.
- Returns:return status ( 0 = o.k. )
- Algorithm:A new descriptor is added to the descriptor area or data of an
existing descriptor is modified and extended, if necessary.
- Remarks:If `felem' = -1, descriptor values are appended to existing ones.
Function
SCDWRH
SCDWRH(imno,descr,values,felem,nval)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 char.) |
char *values |
IN: buffer with help text |
int felem |
IN: position of 1st char. in help text to be accessed |
int nval |
IN: no. of characters to write |
- Purpose:Write the help text of a descriptor.
- Returns:return status ( 0 = o.k. )
- Algorithm:A help text is added for the given descriptor or the help text of a
descriptor is modified and extended, if necessary.
- Remarks:If `felem' = -1, the buffer `values' is appended to the
help text.
Function
SCDWRI
SCDWRI(imno,descr,values,felem,nval,unit)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 char.) |
int *values |
IN: buffer with descriptor data |
int felem |
IN: position of 1st descriptor value to be accessed |
int nval |
IN: no. of data values to write |
int *unit |
IN: unit-pointer |
- Purpose:Write a descriptor and its data.
- Returns:return status ( 0 = o.k. )
- Algorithm:A new descriptor is added to the descriptor area or data of an
existing descriptor is modified and extended, if necessary.
- Remarks:If `felem' = -1, descriptor values are appended to existing ones.
Function
SCDWRR
SCDWRR(imno,descr,values,felem,nval,unit)
int imno |
IN: file id of data frame |
char *descr |
IN: descriptor name (max. 15 char.) |
float *values |
IN: buffer with descriptor data |
int felem |
IN: position of 1st descriptor value to be accessed |
int nval |
IN: no. of data values to write |
int *unit |
IN: unit-pointer |
- Purpose:Write a descriptor and its data.
- Returns:return status ( 0 = o.k. )
- Algorithm:A new descriptor is added to the descriptor area or data of an
existing descriptor is modified and extended, if necessary.
- Remarks:If `felem' = -1, descriptor values are appended to existing ones.
Module Version
[3.10]
(17-Jan-1994)
Module SCE
Author: K. Banse, ESO - Garching
Language: C
Classification: standard interfaces, errors
Environment:
- VMS and UNIX
- #include <midas_def.h>
Comments:
This module contains the routines to handle errors in MIDAS.
The functions provided are:
- Setup program behaviour in case of errors/warnings (SCECNT)
- Terminate program in case of errors and signal errors (SCETER, SCESIG)
Function
SCECNT
SCECNT(action,cont,log,disp)
char *action |
IN: GET or PUT |
int *cont |
IN: pointer to continuation flag |
int *log |
IN: pointer to log flag |
int *disp |
IN: pointer to display flag |
- Purpose: Modify flow of control after an error/warning occurred
- Returns: status always = 0
- Algorithm:straight forward
- Remarks:Continue_flag
= -1 (stop on warnings and errors),
= 0 (stop on errors only),
= 1 (continue always).
Log_flag
= 0 (log nothing),
= 1 (log only errors),
= 2 (log warnings and errors).
Display_flag
= 0 (display nothing on the terminal),
= 1 (display errors),
= 2 (display warnings and errors).
In Midas the default is 0, 2 and 1 for the Continue, Log and
Display_flag.
Function
SCETER
SCETER(errno,text)
int errno |
IN: error no. |
char *text |
IN: message to display |
- Purpose:Abort program and also the MIDAS procedure it was embedded in
- Returns: nothing
- Algorithm:display text, put error no. 'errno' into key PROGSTAT and
stop execution
Function
SCESIG
SCESIG(sys,text,stat)
char *sys |
IN: system from which error emanated |
char *text |
IN: message to display |
int stat |
IN: error no. |
- Purpose: Signal an error to the calling routine
- Returns: nothing
- Algorithm:straight forward
Module Version
[3.10]
(17-Jan-1994)
Module SCF
Author: K. Banse, ESO - Garching
Language: C
Classification: standard interfaces, bulk data files
Environment:
- VMS and UNIX
- #include <midas_def.h>
Comments:
This module contains the routines to manipulate MIDAS data frames.
The functions provided are:
- Create, open and close data files (SCFCRE, SCFOPN, SCFCLO)
- Get info about data files (SCFINF)
- Rename and delete data files (SCFDEL, SCFRNM)
- Input and output of frame data (SCFMAP, SCFUNM, SCFGET, SCFPUT)
Main arguments used by the routines are:
- name
- name of MIDAS data frame
- imno
- file id of related MIDAS frame
- dattype
- format how the data is stored on disk
- filtype
- type of MIDAS data frame
- iomode
- access mode of the frame
- felem
- first element to be accessed, the very first element is indicated
by 1 (not by 0 as in C-arrays) for compatibility with the relevant
FORTRAN interfaces.
Function
SCFOPN
SCFOPN(name,dattype,newopn,filtype,imno)
char *name |
IN: name of data frame |
int dattype |
IN: data types as defined below |
int newopn |
IN: new_open_flag: = 0 open normally, = 1 open same file again |
int filtype |
IN: filetype as defined below |
int *imno |
OUT: file id of the frame |
- Purpose:Open an existing frame and return its internal file no.
- Returns:return status (0 = o.k.)
- Algorithm:Use low level interfaces to do the job
- Remarks:Supported data types are:
D_R4_FORMAT, D_R8_FORMAT, D_I4_FORMAT, D_I2_FORMAT,
D_UI2_FORMAT, D_I1_FORMAT and D_OLD_FORMAT.
Filetypes are:
F_IMA_TYPE, F_TBL_TYPE, F_FIT_TYPE and F_OLD_TYPE.
Function
SCFINF
SCFINF(name,fno,ibuf)
char *name |
IN: name of data frame |
int fno |
IN: flag for requested info |
int *ibuf |
OUT: buffer with requested info |
- Purpose:open the frame (except for `fno'=0) and return the file info in
buffer of up to 5 integers
- Returns:return status (0 = o.k., else the required info cannot be obtained)
- Algorithm:Use low level interfaces to do the job
- Remarks:`fno' = 0 for getting the file id (imno) of `name', i.e. check if
frame `name' has been opened already
`fno' = 1 for getting version_no., file_type, short int, int
and floating format
`fno' = 2 for getting no_bytes_per_pixel, format, pixels_per_block,
startblock and
lastblock
`fno' = 3 for getting file_type, format, file_protect, file_compress
`fno' = 4 for getting no_bytes_per_pixel, format, file_type
`fno' = 99 to find out if file `name' exists,
no buffer is returned, instead the
status is set to 0 (o.k. = file exists) or not
Function
SCFCLO
SCFCLO(imno)
int imno |
IN: file id of data frame |
- Purpose:Close a frame.
- Returns:return status (0 = o.k.)
- Algorithm:Add frame entry to image catalog (if enabled) and close file on disk.
Function
SCFCRE
SCFCRE(name,dattype,iomode,filtype,size,imno)
char *name |
IN: name of frame |
int dattype |
IN: data type, e.g. D_R4_FORMAT, ... |
int iomode |
IN: opening mode, e.g. F_O_MODE, ... |
int filtype |
IN: filetype no., e.g. F_TBL_TYPE, ... |
int size |
IN: size of frame (= no. of data values in file) |
int *imno |
OUT: file id |
- Purpose:Create a frame with data of given type and return its internal
file no.
- Returns:return status (0 = o.k.)
- Algorithm:Fill all internal data structures and create file on disk
- Remarks:Opening modes are: F_O_MODE or F_X_MODE,
see SCFOPN for details of different data and file types.
Function
SCFDEL
SCFDEL(name)
char *name |
IN: name of frame |
- Purpose:Delete a frame
- Returns:return status (0 = o.k.)
- Algorithm:Use low level interfaces to do the job
Function
SCFMAP
SCFMAP(imno,iomode,felem,size,actsize,pntr)
int imno |
IN: file id of data frame |
int iomode |
IN: opening mode, e.g. F_O_MODE, ... |
int felem |
IN: 1st pixel to be accessed in data space |
int size |
IN: number of data values (pixels) to be mapped |
int *actsize |
OUT: actual no. of pixels mapped |
char **pntr |
OUT: pointer to data in memory |
- Purpose:Map a new data frame into memory for writing/reading
or just get virtual memory (iomode = F_X_MODE)
- Returns:return status (0 = o.k.)
- Algorithm:return pointer to first element which is required
- Remarks:Modes are:
F_I_MODE (read), F_IO_MODE (read_write),
F_O_MODE (write) and F_X_MODE (allocate virtual memory)
Function
SCFUNM
SCFUNM(imno)
int imno |
IN: file id of data frame |
- Purpose:Release mapped memory of a data frame
- Returns:return status (0 = o.k.)
- Algorithm:Use low level functions
Function
SCFGET
SCFGET(imno,felem,size,actsize,bufadr)
int imno |
IN: file id of data frame |
int felem |
IN: 1st pixel to be accessed in data space |
int size |
IN: number of data values (pixels) to be read |
int *actsize |
OUT: actual no. of pixels read |
char *bufadr |
OUT: data buffer |
- Purpose:Read data from disk frame into memory
- Returns:return status (0 = o.k.)
- Algorithm:synchronous disk I/O, data are converted on the fly if necessary
- Remarks:SCFGET cannot be used for frames created with F_X_MODE.
Function
SCFPUT
SCFPUT(imno,felem,size,bufadr)
int imno |
IN: file id of data frame |
int felem |
IN: 1st pixel to be accessed in data space |
int size |
IN: number of data values (pixels) to be written |
char *bufadr |
IN: data buffer |
- Purpose:write data from memory into disk frame
- Returns:return status (0 = o.k.)
- Algorithm:synchronous disk I/O, data are converted on the fly if necessary
- Remarks:SCFPUT cannot be used for frames created with F_X_MODE.
Function
SCFRNM
SCFRNM(oldname,newname)
char *oldname |
IN: old name |
char *newname |
OUT: new name |
- Purpose:rename a disk file
- Returns:return status (0 = o.k.)
- Algorithm:use low level interfaces
- Remarks:Complete file names, i.e. including file type (extension),
have to be used.
Module Version
[3.10]
(17-Jan-1994)
Module SCI
Author: K. Banse, ESO - Garching
Language: C
Classification: standard interfaces, data frames, descriptors
Environment:
- VMS and UNIX
- #include <midas_def.h>
Comments:
This module contains the (high level) routines to handle MIDAS images.
The functions provided are:
- Get image data and descriptors from disk (SCIGET)
- Create image frame and fill its standard descriptors on disk (SCIPUT).
This routine does not fill in any data values!
Main arguments used by the routines are:
- name
- name of MIDAS data frame
- imno
- file id of MIDAS frame
- dattype
- format how the data is stored on disk
- filtype
- type of MIDAS data frame
- iomode
- access mode of the frame
- pntr
- pointer to mapped data
Function
SCIGET
SCIGET(name,dattype,iomode,filtype,maxdim,naxis,npix,start,step,ident,cunit,pntr,imno)
char *name |
IN: data frame name |
int dattype |
IN: data type |
int iomode |
IN: opening mode of frame, F_I_MODE or F_IO_MODE |
int filtype |
IN: filetype no. |
int maxdim |
IN: maximum number of dimensions |
int *naxis |
OUT: no of dimensions of the image |
int *npix |
OUT: size of each dimension |
double *start |
OUT: start coordinates: start is an array of naxis elements |
double *step |
OUT: stepsizes : step is an array of naxis elements |
char *ident |
OUT: ascii identifier of image |
char *cunit |
OUT: unit of each axis (16 char per unit) |
char **pntr |
OUT: pointer to mapped data |
int *imno |
OUT: file id of data frame |
- Purpose:Open image frame.
Map all data for reading or updating and read the standard descriptors.
- Returns:return status (0 = o.k.)
- Algorithm:Use SCDRDx and SCFMAP to map and to read the standard descriptors.
- Remarks:For a detailed description of the parameters , see text for SCF...
and SCD... routines
Function
SCIPUT
SCIPUT(name,dattype,iomode,filtype,naxis,npix,start,step,ident,cunit,pntr,imno)
char *name |
IN: data frame name |
int dattype |
IN: data type |
int iomode |
IN: opening mode of frame, F_O_MODE or F_X_MODE |
int filtype |
IN: file type no. |
int naxis |
IN: no of dimensions of the image |
int *npix |
IN: size of each dimension |
double *start |
IN: start coordinates: start is an array of naxis elements |
double *step |
IN: stepsizes : step is an array of naxis elements |
char *ident |
IN: ascii identifier of image |
char *cunit |
IN: unit of each axis (16 char per unit) |
char **pntr |
OUT: pointer to mapped data |
int *imno |
OUT: file id of data frame |
- Purpose:Create and map complete bulk data frame and write the standard
descriptors
- Returns:return status (0 = o.k.)
- Algorithm:call SCFCRE, SCFMAP and SCDWRx routines
- Remarks:This call does not write any data values into the new frame, it
just allocates (maps) the space for it!
For a detailed description of the parameters , see text for SCF...
and SCD... routines
Module Version
[3.10]
(17-Jan-1994)
Module SCK
Author: K. Banse, ESO - Garching
Language: C
Classification: standard interfaces, keyword data base
Environment:
- VMS and UNIX
- #include <midas_def.h>
Comments:
This module contains the routines to interact with the keywords of MIDAS.
The functions provided are:
- Find keywords and get information about them (SCKFND, SCKINF)
- Prompt for keywords (SCKPRC, SCKPRD, SCKPRI, SCKPRR)
- Read contents of keywords (SCKRDC, SCKRDD, SCKRDI, SCKRDR)
- Write contents of keywords (SCKWRC, SCKWRD, SCKWRI, SCKWRR)
- Read contents of char. keyword in a simplified way (SCKGETC)
Main arguments used by the routines are:
- key
- name of keyword, max. 8 chars. long and must begin with an
alphabetic char.
- felem
- first element to be accessed, the very first element is indicated
by 1 (not by 0 as in C-arrays) for compatibility with the relevant
FORTRAN interfaces.
- maxvals
- maximum number of elements required.
- actvals
- actual number of elements accessed, value returned by the
routine.
- unit
- unit of keyword, currently not implemented - just used as a
placeholder for now.
- null
- no. of null values in keyword, currently not implemented - just
used as a placeholder for now.
Function
SCKFND
SCKFND(key,type,noelem,bytelem)
char *key |
IN : keyword name (max. 8 chars.) |
char *type |
OUT: type of key |
int *noelem |
OUT: no. of elements |
int *bytelem |
OUT: no. of bytes per element |
- Purpose:Find keyword named `key' and provide info about it.
- Returns:return status ( 0 = ok )
- Algorithm:Search keyword data base to find key + related info.
- Remarks:type of keyword
= I for integer, = R for real, = D for double, = C for character keywords;
if key not found, type = ' ' (a blank) is returned
bytelem = fixed (4,4,8) for integer, real, double keywords
for character keywords, bytelem >= 1
Function
SCKINF
SCKINF(npos,fno,buf,lbuf,numbuf)
int npos |
IN: position of keyword |
int fno |
IN: specifies desired info, 1 = NAME, 2 = TYPE, 3 = SIZE |
char *buf |
OUT: buffer for NAME + TYPE info |
int lbuf |
IN: max. length of buffer above |
int *numbuf |
OUT: buffer for SIZE info |
- Purpose:Provide info about keyword at position `npos'.
- Returns:return status ( 0 = ok )
- Algorithm:Go through the keywords data base and provide the desired info.
- Remarks:for fno = 1,2 the character buffer `buf' is filled,
for fno = 3 the numerical output buffer `numbuf' is filled.
Function
SCKGETC
SCKGETC(key,felem,maxvals,actvals,values)
char *key |
IN: keyword name (max. 8 chars.) |
int felem |
IN: position of 1st element to be accessed |
int maxvals |
IN: max. no. of characters to be returned |
int *actvals |
OUT: actual no. of characters returned |
char *values |
OUT: buffer for data values |
- Purpose:Get data from character keyword and terminate with `
6#60'
(no trailing blanks).
- Returns:return status ( 0 = o.k. )
- Algorithm:Use SCKRDC.
- Algorithm:This interface only works for char. keywords with 1 byte (char.)
per element.
Function
SCKPRC
SCKPRC(prompt,key,noelm,felem,maxvals,actvals,values,unit,null)
char *prompt |
IN: prompt string (null terminated) |
char *key |
IN: keyword name (max. 8 chars.) |
int noelm |
IN: no. of bytes per data value |
int felem |
IN: 1st data item to be read |
int maxvals |
IN: no. of elements to get |
int *actvals |
OUT: actual no. of elements returned |
char *values |
OUT: buffer for data values |
int *unit |
OUT: address of unit-pointer |
int *null |
OUT: no. of null values in keyword |
- Purpose:Display prompt string and read character keyword data from
terminal
- Returns:return status ( 0 = ok )
- Algorithm:`actvals' will be set to the actual no. of values returned.
- Remarks:`noelm' > 1 enables you to use character arrays, where
each data value is in effect a char. string of `noelm' bytes.
Function
SCKPRD
SCKPRD(prompt,key,felem,maxvals,actvals,values,unit,null)
char *prompt |
IN: prompt string (null terminated) |
char *key |
IN: keyword name (max. 8 chars.) |
int felem |
IN: 1st data item to be read |
int maxvals |
IN: no. of elements to get |
int *actvals |
OUT: actual no. of elements returned |
double *values |
OUT: buffer for data values |
int *unit |
OUT: address of unit-pointer |
int *null |
OUT: no. of null values in keyword |
- Purpose:Display prompt string and read double precision
keyword data from terminal.
- Returns:return status ( 0 = ok )
- Algorithm:`actvals' will be set to the actual no. of values returned.
Function
SCKPRI
SCKPRI(prompt,key,felem,maxvals,actvals,values,unit,null)
char *prompt |
IN: prompt string (null terminated) |
char *key |
IN: keyword name (max. 8 chars.) |
int felem |
IN: 1st data item to be read |
int maxvals |
IN: no. of elements to get |
int *actvals |
OUT: actual no. of elements returned |
int *values |
OUT: buffer for data values |
int *unit |
OUT: address of unit-pointer |
int *null |
OUT: no. of null values in keyword |
- Purpose:Display prompt string and read integer keyword data from terminal.
- Returns:return status ( 0 = ok )
- Algorithm:`actvals' will be set to the actual no. of values returned.
Function
SCKPRR
SCKPRR(prompt,key,felem,maxvals,actvals,values,unit,null)
char *prompt |
IN: prompt string (null terminated) |
char *key |
IN: keyword name (max. 8 chars.) |
int felem |
IN: 1st data item to be read |
int maxvals |
IN: no. of elements to get |
int *actvals |
OUT: actual no. of elements returned |
float *values |
OUT: buffer for data values |
int *unit |
OUT: address of unit-pointer |
int *null |
OUT: no. of null values in keyword |
- Purpose:Display prompt string and read real keyword data from terminal.
- Returns:return status ( 0 = ok )
- Algorithm:`actvals' will be set to the actual no. of values returned.
Function
SCKRDC
SCKRDC(key,noelm,felem,maxvals,actvals,values,unit,null)
char *key |
IN: keyword name (max. 8 chars.) |
int noelm |
IN: no. of bytes per data value |
int felem |
IN: first data item to be read |
int maxvals |
IN: no. of elements to get |
int *actvals |
OUT: actual no. of elements returned |
char *values |
OUT: buffer for data values |
int *unit |
OUT: address of unit-pointer |
int *null |
OUT: no. of null values in keyword |
- Purpose:Read data from character keyword.
- Returns:return status ( 0 = ok )
- Algorithm:`actvals' will be set to the actual no. of values returned.
- Remarks:`noelm' > 1 enables you to use character arrays, where
each data value is in effect a char. string of `noelm' bytes
Function
SCKRDD
SCKRDD(key,felem,maxvals,actvals,values,unit,null)
char *key |
IN: keyword name (max. 8 chars.) |
int felem |
IN: first data item to be read |
int maxvals |
IN: no. of elements to get |
int *actvals |
OUT: actual no. of elements returned |
double *values |
OUT: buffer for data values |
int *unit |
OUT: address of unit-pointer |
int *null |
OUT: no. of null values in keyword |
- Purpose:Read data from double precision keyword.
- Returns:return status ( 0 = ok )
- Algorithm:`actvals' will be set to the actual no. of values returned.
Function
SCKRDI
SCKRDI(key,felem,maxvals,actvals,values,unit,null)
char *key |
IN: keyword name (max. 8 chars.) |
int felem |
IN: first data item to be read |
int maxvals |
IN: no. of elements to get |
int *actvals |
OUT: actual no. of elements returned |
int *values |
OUT: buffer for data values |
int *unit |
OUT: address of unit-pointer |
int *null |
OUT: no. of null values in keyword |
- Purpose:Read data from integer keyword.
- Returns:return status ( 0 = ok )
- Algorithm:`actvals' will be set to the actual no. of values returned.
Function
SCKRDR
SCKRDR(key,felem,maxvals,actvals,values,unit,null)
char *key |
IN: keyword name (max. 8 chars.) |
int felem |
IN: first data item to be read |
int maxvals |
IN: no. of elements to get |
int *actvals |
OUT: actual no. of elements returned |
float *values |
OUT: buffer for data values |
int *unit |
OUT: address of unit-pointer |
int *null |
OUT: no. of null values in keyword |
- Purpose:Read data from real keyword.
- Returns:return status ( 0 = ok )
- Algorithm:`actvals' will be set to the actual no. of values returned.
Function
SCKWRC
SCKWRC(key,noelm,values,felem,maxvals,unit)
char *key |
IN: keyword name (max. 8 chars.) |
int noelm |
IN: no. of bytes per data value |
char *values |
IN: buffer with data values |
int felem |
IN: first data item to be written |
int maxvals |
IN: no. of elements to write |
int *unit |
IN: unit-pointer |
- Purpose:Write data into character keyword
- Returns:return status ( 0 = ok )
- Remarks:`noelm' > 1 enables you to use character arrays, where
each data value is in effect a char. string of `noelm' bytes
Function
SCKWRD
SCKWRD(key,values,felem,maxvals,unit)
char *key |
IN: keyword name (max. 8 chars.) |
double *values |
IN: buffer with data values |
int felem |
IN: first data item to be written |
int maxvals |
IN: no. of elements to write |
int *unit |
IN: unit-pointer |
- Purpose:Write data into double precision keyword.
- Returns:return status ( 0 = ok )
Function
SCKWRI
SCKWRI(key,values,felem,maxvals,unit)
char *key |
IN: keyword name (max. 8 chars.) |
int *values |
IN: buffer with data values |
int felem |
IN: first data item to be written |
int maxvals |
IN: no. of elements to write |
int *unit |
IN: unit-pointer |
- Purpose:Write data into integer keyword.
- Returns:return status ( 0 = ok )
Function
SCKWRR
SCKWRR(key,values,felem,maxvals,unit)
char *key |
IN: name of keyword |
float *values |
IN: buffer with data values |
int felem |
IN: first data item to be written |
int maxvals |
IN: no. of elements to write |
int *unit |
IN: unit-pointer |
- Purpose:Write data into real keyword.
- Returns:return status ( 0 = ok )
Module Version
[3.10]
(17-Jan-1994)
Module SCST
Author: K. Banse, ESO - Garching
Language: C
Classification: standard interfaces.
Environment:
- VMS and UNIX
- #include <midas_def.h>
Comments:
This module contains the routines to link into the MIDAS environment and to
display text.
The functions provided are:
- Link to and unlink from the MIDAS environment (SCSPRO, SCSEPI)
- Display (and log) text (SCTPUT, SCTDIS)
Function
SCSPRO
SCSPRO(prog)
char *prog |
IN: name of calling program |
- Purpose:Get into the MIDAS environment.
- Returns:return status ( 0 = o.k )
- Algorithm:Read keywords data base, initialize File Control Table and open
logfile
- Remarks:Set the program name to the string "-1" to run the program outside
a MIDAS session
(this implies that there will be no keywords available...)
Function
SCSEPI
SCSEPI()
- Purpose:Write keywords back and clean up everything
- Returns:return status ( 0 = o.k )
Function
SCTPUT
SCTPUT(text)
char *text |
IN: text string to be displayed |
- Purpose:Display character string on the terminal and store it also
in the Midas logfile.
- Returns:return status ( 0 = o.k )
Function
SCTDIS
SCTDIS(text,bc)
char *text |
IN: text string to be displayed |
int bc |
IN: backspace count |
- Purpose:Display character string on the terminal; do not (!) store it in
the Midas logfile.
- Returns:return status ( 0 = o.k )
- Algorithm:backspace count = 0, write line normally (with carriage-return
and new-line)
= 1, ..., 80, do that many backspaces, so the next message may overwrite
Module Version
[3.00]
(15-Jan-1992)
Module STC
Author: K. Banse ESO - Garching
Language: F77
Classification: MIDAS catalogues
Environment:
- VMS and UNIX
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DEF.INC
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DAT.INC
Comments:
This module contains the routines to interact with the catalogs of MIDAS.
The functions provided are:
- Create catalogs (STCCRE)
- Add and remove entries in catalogs (STCADD, STCSUB)
- Find entries and get sequential entries in a catalog (STCFND, STCGET)
- Display contents of catalogs (STCLIS, STCSHO)
Main arguments used by the routines are:
- CATFIL
- name of catalog
Subroutine
STCCRE
STCCRE(CATFIL,TYPE,FLAG,STAT)
CHARACTER*(*) CATFIL |
IN: name of catalog file |
INTEGER TYPE |
IN: type of files to use |
INTEGER FLAG |
IN: = 1, if `dirfile.dat' exists |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Create a catalog
- Algorithm:If `FLAG' = 1, read each filename from directory output file
`dirfile.dat' and read relevant descriptors from each file and
store in catalog file, else create an empty catalog.
Subroutine
STCADD
STCADD(CATFIL,NAME,IDENT,STAT)
CHARACTER*(*) CATFIL |
IN: name of catalog file |
CHARACTER*(*) NAME |
IN: name of frame to be added |
CHARACTER*(*) IDENT |
IN: IDENT info of frame to be added |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Add entry in a catalog
- Algorithm:Add an entry with given name and identification field to the catalog.
Subroutine
STCSUB
STCSUB(CATFIL,NAME,STAT)
CHARACTER*(*) CATFIL |
IN: name of catalog file |
CHARACTER*(*) NAME |
IN: name of frame to be removed |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Subtract entry in a catalog
- Algorithm:Search for given entry and change first 2 chars to '//', which makes
this entry unused.
Subroutine
STCGET
STCGET(CATFIL,FLAG,NAME,IDENT,NO,STAT)
CHARACTER*(*) CATFIL |
IN: name of catalog file |
INTEGER FLAG |
IN: 0 for name only, = 1 for name and identifier |
CHARACTER*(*) NAME |
OUT: name of frame |
CHARACTER*(*) IDENT |
OUT: identifier of that frame |
INTEGER NO |
IN/OUT: current/next entry no. as input/output |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Get next sequential entry from a catalog
- Algorithm:Return name and identifier of next entry in catalog file;
return a blank in NAME(1:1), if at EOF.
Parameter `NO' has to be set to 0 in the first call of the routine.
Subroutine
STCLIS
STCLIS(CATFIL,INTVAL,STAT)
CHARACTER*(*) CATFIL |
IN: name of catalog file |
INTEGER INTVAL(2) |
IN: listing interval [low,hi] |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:List entries of a catalog
- Algorithm:Read and display catalog, entry by entry.
Subroutine
STCFND
STCFND(CATFIL,FRMNO,FRAME,STAT)
CHARACTER*(*) CATFIL |
IN: name of catalog file |
INTEGER FRMNO |
IN: entry no. in catalog |
CHARACTER*(*) FRAME |
OUT: corresponding frame name |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Find entry in a catalog and return corresponding frame name
- Algorithm:Search for given entry no. and return connected frame name.
Subroutine
STCSHO
STCSHO(CATFIL,NOENT,LAST,STAT)
CHARACTER*(*) CATFIL |
IN: name of catalog file |
INTEGER NOENT |
OUT: no. of entries |
INTEGER LAST |
OUT: last entry no. |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Show size and type of a catalog
- Algorithm:Read and count active entries of catalog.
Module Version
[3.00]
(15-Jan-1992)
Module STD
Author: K. Banse ESO - Garching
Language: F77
Classification: standard interfaces, descriptors
Environment:
- VMS and UNIX
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DEF.INC
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DAT.INC
Comments:
This module contains the routines to interact with the descriptors of MIDAS
frames.
The functions provided are:
- Find descriptors and get information about them (STDFND, STDINF)
- Copy and delete descriptors (STDCOP, STDDEL)
- Read contents of descriptors (STDRDC, STDRDD, STDRDI, STDRDR)
- Write contents of descriptors (STDWRC, STDWRD, STDWRI, STDWRR)
Main arguments used by the routines are:
- NO
- file id of related MIDAS frame
- DSC
- name of descriptor, max. 15 chars. long and must begin with an
alphabetic char.
- FELM
- first element to be accessed, the very first element is indicated
by 1
FORTRAN interfaces.
- MAXS
- maximum number of elements required.
- ACTS
- actual number of elements accessed, value returned by the
routine.
- DUN
- unit of descriptor, currently not implemented - just used as a
placeholder for now.
- DNUL
- no. of null values in descriptor, currently not implemented - just
used as a placeholder for now.
- STAT
- return status.
Subroutine
STDCOP
STDCOP(FROM,TO,MASK,DSC,STAT)
INTEGER FROM |
IN: file id of source frame |
INTEGER TO |
IN: file id of destination frame |
INTEGER MASK |
IN: copy_mask |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Copy descriptors from one file to another one.
- Algorithm:Depending on `MASK' the relevant descriptors are read from the source
frame and written to the destination frame.
- Remarks:Mask for copying:
1 - copy all descriptors,
2 - copy only standard descriptors (cf. Appendix E,
3 - copy all but standard descriptors,
4 - copy single descriptor specified by par. `DSC',
5 - copy all but extended list of standard descriptors
Subroutine
STDDEL
STDDEL(NO,DSC,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Delete descriptors
- Algorithm:The descriptor directory is scanned for the specified name and if
found, that name is marked as deleted.
Subroutine
STDFND
STDFND(NO,DSC,TYPE,NOELM,BYTELM,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
CHARACTER*(*) TYPE |
OUT: descriptor type - I, R, C, D or ' ' (a blank) |
INTEGER NOELM |
OUT: no. of elements |
INTEGER BYTELM |
OUT: no. of bytes per element |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Get descriptor information
- Algorithm:Search descriptor directory, if descr. `DSC' is not found,
TYPE(1:1) is set to a blank.
Subroutine
STDINF
STDINF(NO,NPOS,FNO,BUF,NUMBUF,STAT)
INTEGER NO |
IN: file id of frame |
INTEGER NPOS |
IN: position of descr. |
INTEGER FNO |
IN: specify desired info |
CHARACTER*(*) BUF |
OUT: return buffer (FNO=1,2) |
INTEGER NUMBUF |
OUT: return value (FNO=3) |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Find descriptor at position #n and return info.
- Algorithm:Go through the descriptor directory and provide the desired info.
For `FNO' = 1 the name of the descr. is stored into `BUF';
for `FNO' = 2 the type of the descr. is stored as a char. string in `BUF';
for `FNO' = 3 the no. of elements of the descriptor is stored in `NUMBUF'.
Subroutine
STDRDC
STDRDC (NO,DSC,NOELM,FELM,MAXS,ACTS,VALS,DUN,DNUL,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
INTEGER NOELM |
IN: no. of bytes per data value |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: max. no. of values to read |
INTEGER ACTS |
OUT: actual no. of values read |
CHARACTER*(*) VALS |
OUT: buffer for data |
INTEGER DUN |
OUT: units |
INTEGER DNUL |
OUT: no. of null values |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Read character descriptor
- Algorithm:`ACTS' will be set to the actual no. of values returned.
- Remarks:`NOELM' larger than 1 enables you to use character arrays, where
each data value is in effect a char. string of `NOELM' bytes.
Subroutine
STDRDD
STDRDD(NO,DSC,FELM,MAXS,ACTS,VALS,DUN,DNUL,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: max. no. of values to read |
INTEGER ACTS |
OUT: actual no. of values read |
DOUBLE PRECISION VALS(1) |
OUT: buffer for data |
INTEGER DUN |
OUT: units |
INTEGER DNUL |
OUT: no. of null values |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Read double precision descriptor
- Algorithm:`ACTS' will be set to the actual no. of values returned.
Subroutine
STDRDH
STDRDH(NO,DSC,FELM,MAXS,ACTS,VALS,TOTVLS,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: max. no. of values to read |
INTEGER ACTS |
OUT: actual no. of values read |
CHARACTER*(*) VALS |
OUT: buffer for help text |
INTEGER TOTVLS |
OUT: total size of help text |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Read the help text of a descriptor
- Algorithm:`ACTS' will be set to the actual no. of characters of the help text
returned in `VALS'.
If no help text exists for the descriptor, `TOTVLS' is set to -1.
Subroutine
STDRDI
STDRDI(NO,DSC,FELM,MAXS,ACTS,VALS,DUN,DNUL,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: max. no. of values to read |
INTEGER ACTS |
OUT: actual no. of values read |
INTEGER VALS(1) |
OUT: buffer for data |
INTEGER DUN |
OUT: units |
INTEGER DNUL |
OUT: no. of null values |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Read integer descriptor
- Algorithm:`ACTS' will be set to the actual no. of values returned.
Subroutine
STDRDR
STDRDR(NO,DSC,FELM,MAXS,ACTS,VALS,DUN,DNUL,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: max. no. of values to read |
INTEGER ACTS |
OUT: actual no. of values read |
REAL VALS(1) |
OUT: buffer for data |
INTEGER DUN |
OUT: units |
INTEGER DNUL |
OUT: no. of null values |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Read real descriptor
- Algorithm:`ACTS' will be set to the actual no. of values returned.
Subroutine
STDWRC
STDWRC(NO,DSC,NOELM,VALS,FELM,MAXS,DUN,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
INTEGER NOELM |
IN: no. of bytes per data value |
CHARACTER*(*) VALS |
IN: data buffer |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of values to write |
INTEGER DUN |
IN: units |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Write character descriptor
- Algorithm:A new descriptor is added to the descriptor area or data of an
existing descriptor is modified and extended, if necessary.
- Remarks:If `FELM' = -1, descriptor values are appended to existing ones.
`NOELM' larger than 1 enables you to use character arrays, where
each data value is in effect a char. string of `NOELM' bytes.
Subroutine
STDWRD
STDWRD(NO,DSC,VALS,FELM,MAXS,DUN,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
DOUBLE PRECISION VALS(1) |
IN: data buffer |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of values to write |
INTEGER DUN |
IN: units |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Write double precision descriptor
- Algorithm:A new descriptor is added to the descriptor area or data of an
existing descriptor is modified and extended, if necessary.
- Remarks:If `FELM' = -1, descriptor values are appended to existing ones.
Subroutine
STDWRH
STDWRH(NO,DSC,VALS,FELM,MAXS,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
CHARACTER*(*) VALS |
IN: buffer with help text |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of characters to write |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Write help text of a descriptor
- Algorithm:A help text is added for the descriptor area or the help text of an
existing descriptor is modified and extended, if necessary.
- Remarks:If `FELM' = -1, the buffer values are appended to the help text.
Subroutine
STDWRI
STDWRI(NO,DSC,VALS,FELM,MAXS,DUN,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
INTEGER VALS(1) |
IN: data buffer |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of values to write |
INTEGER DUN |
IN: units |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose:Write integer descriptor
- Algorithm:A new descriptor is added to the descriptor area or data of an
existing descriptor is modified and extended, if necessary.
- Remarks:If `FELM' = -1, descriptor values are appended to existing ones.
Subroutine
STDWRR
STDWRR(NO,DSC,VALS,FELM,MAXS,DUN,STAT)
INTEGER NO |
IN: file id of frame |
CHARACTER*(*) DSC |
IN: descriptor name (max 15 chars.) |
REAL VALS(1) |
IN: data buffer |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of values to write |
INTEGER DUN |
IN: units |
INTEGER STAT |
OUT: status (=0, o.k.) |
- Purpose: write real descriptor
- Algorithm:A new descriptor is added to the descriptor area or data of an
existing descriptor is modified and extended, if necessary.
- Remarks:If `FELM' = -1, descriptor values are appended to existing ones.
Module Version
[3.00]
(15-Jan-1992)
Module STE
Author: K. Banse ESO - Garching
Language: F77
Classification: standard interfaces, errors
Environment:
- VMS and UNIX
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DEF.INC
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DAT.INC
Comments:
This module contains the routines to handle errors in MIDAS.
The functions provided are:
- Setup program behaviour in case of errors/warnings (STECNT)
- Terminate program in case of errors and signal errors (STETER, STESIG)
Subroutine
STECNT
STECNT(ACTION,CONT,LOG,DISP)
CHARACTER*(*) ACTION |
IN: action = GET or PUT |
INTEGER CONT |
IN/OUT: continue flag |
INTEGER LOG |
IN/OUT: log flag |
INTEGER DISP |
IN/OUT: display flag |
- Purpose:Set/clear error control flags.
- Algorithm:Straight forward, but note that the parameters cannot be constants!
- Remarks:Continue_flag
= -1 (stop on warnings and errors),
= 0 (stop on errors only),
= 1 (continue always).
Log_flag
= 0 (log nothing),
= 1 (log only errors),
= 2 (log warnings and errors).
Display_flag
= 0 (display nothing on the terminal),
= 1 (display errors),
= 2 (display warnings and errors).
In Midas the default is 0, 2 and 1 for the Continue, Log and
Display_flag.
Subroutine
STETER
STETER(ERRNO,TEXT)
INTEGER ERRNO |
IN: error number |
CHARACTER*(*) TEXT |
IN: error message |
- Purpose:Display error message and abort.
- Algorithm:display text, put error no. 'errno' into key PROGSTAT and
stop execution
Subroutine
STESIG
STESIG(SYS,TEXT,ERRNO)
CHARACTER*(*) SYS |
IN: subsystem |
CHARACTER*(*) TEXT |
IN: error message |
INTEGER ERRNO |
IN: error number |
- Purpose:Signal an error to the calling routine.
Module Version
[3.00]
(15-Jan-1992)
Module STF
Author: K. Banse ESO - Garching
Language: F77
Classification: standard interfaces, bulk data frames
Environment:
- VMS and UNIX
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DEF.INC
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DAT.INC
Comments:
This module contains the routines to manipulate MIDAS data frames.
The functions provided are:
- Create, open and close data files (STFCRE, STFOPN, STFCLO)
- Get info about data files (STFINF)
- Rename and delete data files (STFDEL, STFRNM)
- Input and output of frame data (STFMAP, STFUNM, STFGET, STFPUT)
Main arguments used by the routines are:
- NAME
- name of MIDAS data frame
- NO
- file id of related MIDAS frame
- DATTYP
- format how the data is stored on disk
- FILTYP
- type of MIDAS data frame
- IOMODE
- access mode of the frame
- FELM
- first element to be accessed, the very first element is indicated
by 1
- STAT
- return status.
Subroutine
STFOPN
STFOPN(NAME,DATTYP,NEWOPN,FILTYP,NO,STAT)
CHARACTER*(*) NAME |
IN: name of frame |
INTEGER DATTYP |
IN: data type |
INTEGER NEWOPN |
IN: new_open_flag: = 0 open normally, = 1 open same
file again |
INTEGER FILTYP |
IN: file type |
INTEGER NO |
OUT: file id of frame |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Open a frame and return the internal file no.
- Remarks:Supported data types are:
D_R4_FORMAT, D_R8_FORMAT, D_I4_FORMAT, D_I2_FORMAT,
D_UI2_FORMAT, D_I1_FORMAT and D_OLD_FORMAT.
Filetypes are:
F_IMA_TYPE, F_TBL_TYPE, F_FIT_TYPE and F_OLD_TYPE.
Subroutine
STFINF
STFINF(NAME,FNO,IBUF,STAT)
CHARACTER*(*) NAME |
IN: name of frame |
INTEGER FNO |
IN: info_request flag |
INTEGER IBUF(5) |
OUT: returned info |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Open the frame (except for `FNO'=0) and return the file info in
buffer of up to 5 integers
- Returns:return status (0 = o.k., else the required info cannot be obtained)
- Remarks:`FNO' = 0 for getting the file id (`NO') of `NAME', i.e. check if
frame `NAME' has been opened already
`FNO' = 1 for getting version_no., file_type, short int, int
and floating format
`FNO' = 2 for getting no_bytes_per_pixel, format,pixels_per_block,
startblock and
lastblock
`FNO' = 3 for getting file_type, format, file_protect, file_compress
`FNO' = 4 for getting no_bytes_per_pixel, format, file_type
`FNO' = 99 to find out if file `NAME' exists,
no buffer is returned, instead the
status is set to 0 (o.k. = file exists) or not
Subroutine
STFCLO
STFCLO(NO,STAT)
INTEGER NO |
IN: file id of frame |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Close a frame
- Algorithm:add frame to catalog (if enabled) and close file on disk
Subroutine
STFCRE
STFCRE(NAME,DATTYP,IOMODE,FILTYP,SIZE,NO,STAT)
CHARACTER*(*) NAME |
IN: name of frame |
INTEGER DATTYP |
IN: data type, e.g. D_R4_FORMAT, ... |
INTEGER IOMODE |
IN: opening mode, e.g. F_O_MODE, ... |
INTEGER FILTYP |
IN: file type, e.g. F_TBL_TYPE, ... |
INTEGER SIZE |
IN: size of frame (= no. of data values in file) |
INTEGER NO |
OUT: file id of frame |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Create a frame with data of given type and return its internal
file no.
- Algorithm:fill all internal data structures and create file on disk
- Remarks:Opening modes are: F_O_MODE, F_X_MODE,
see STFOPN for details of different data and file types
Subroutine
STFDEL
STFDEL(NAME,STAT)
CHARACTER*(*) NAME |
IN: name of frame |
INTEGER STAT |
OUT: status (0 = o.k.) |
Subroutine
STFMAP
STFMAP(NO,IOMODE,FELM,SIZE,ACTSZ,PNTR,STAT)
INTEGER NO |
IN: file id of frame |
INTEGER IOMODE |
IN: mode |
INTEGER FELM |
IN: 1st pixel to map |
INTEGER SIZE |
IN: no. of pixels to map |
INTEGER ACTSZ |
OUT: actual no. mapped |
INTEGER PNTR |
OUT: pointer to mapped area |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Map a new data frame into memory for writing/reading
or just get virtual memory (iomode = F_X_MODE)
- Algorithm:return pointer to first element which is required
- Remarks:Modes are: F_O_MODE, F_IO_MODE, F_O_MODE, F_X_MODE
Subroutine
STFUNM
STFUNM(NO,STAT)
INTEGER NO |
IN: file id of frame |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Unmap a mapped frame
Subroutine
STFGET
STFGET(NO,FELM,SIZE,ACTSZ,BUFADR,STAT)
INTEGER NO |
IN: file id of frame |
INTEGER FELM |
IN: 1st pixel to be accessed |
INTEGER SIZE |
IN: no. of pixels to be read |
INTEGER ACTSZ |
OUT: actual no. read |
INTEGER BUFADR |
OUT: data buffer |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Read data from disk frame into memory
- Algorithm:synchronous disk I/O, data are converted on the fly if necessary
- Remarks:STFGET cannot be used for frames created with F_X_MODE.
Subroutine
STFPUT
STFPUT(NO,FELM,SIZE,BUFADR,STAT)
INTEGER NO |
IN: file id of frame |
INTEGER FELM |
IN: 1st pixel to be accessed |
INTEGER SIZE |
IN: no. of pixels to be written |
INTEGER BUFADR |
IN: data buffer |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Write data from memory into disk frame
- Algorithm:synchronous disk I/O, data are converted on the fly if necessary
- Remarks:STFPUT cannot be used for frames created with F_X_MODE.
Subroutine
STFRNM
STFRNM(OLDNAME,NEWNAME,STAT)
CHARACTER*(*) OLDNAME |
IN: old name of frame |
CHARACTER*(*) NEWNAME |
IN: new name of frame |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Rename a frame on disk
- Remarks:Complete filename, i.e. including file type, have to be given.
Module Version
[3.00]
(15-Jan-1992)
Module STI
Author: K. Banse ESO - Garching
Language: F77
Classification: standard interfaces, data frames, descriptors
Environment:
- VMS and UNIX
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DEF.INC
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DAT.INC
Comments:
This module contains the (high level) routines to handle MIDAS images.
The functions provided are:
- Get image data and descriptors from disk (STIGET)
- Create image frame and fill its standard descriptors on disk (STIPUT).
This routine does not fill in any data values!
Main arguments used by the routines are:
- NAME
- name of MIDAS data frame.
- NO
- file id of MIDAS frame.
- DATTYP
- format how the data is stored on disk.
- FILTYP
- type of MIDAS data frame.
- IOMODE
- access mode of the frame.
- PNTR
- pointer to mapped data.
- STAT
- return status.
Subroutine
STIGET
STIGET(NAME,DATTYP,IOMODE,FILTYP,MAXDIM, NAXIS,NPIX,START,STEP,
IDENT,CUNIT,PNTR,NO,STAT)
CHARACTER*(*) NAME |
IN: name of frame |
INTEGER DATTYP |
IN: data type |
INTEGER IOMODE |
IN: opening mode, F_I_MODE or F_IO_MODE |
INTEGER FILTYP |
IN: file type |
INTEGER MAXDIM |
IN: max. no. of dimensions |
INTEGER NAXIS |
OUT: no. of dimensions |
INTEGER NPIX(1) |
OUT: no. of pixels per axis |
DOUBLE PRECISION START(1) |
OUT: start values |
DOUBLE PRECISION STEP(1) |
OUT: stepsizes |
CHARACTER*(*) IDENT |
OUT: ASCII identification for frame |
CHARACTER*(*) CUNIT |
OUT: unit of each axis + data |
INTEGER PNTR |
OUT: pointer to mapped data |
INTEGER NO |
OUT: file id of frame |
INTEGER STAT |
OUT: status ( 0 = o.k. ) |
- Purpose:map complete data frame for reading or updating and read the stand
ard descriptors.
- Algorithm:use STDRDx and STFMAP to map and to read the standard descriptors.
- Remarks:The char. arrays IDENT and CUNIT have to be initialized before the
call to STIGET, otherwise nothing may be returned!
For a detailed description of the parameters , see text for STF...
and STD... routines
Subroutine
STIPUT
STIPUT(NAME,DATTYP,IOMODE,FILTYP, NAXIS,NPIX,START,STEP,
IDENT,CUNIT,PNTR,NO,STAT)
CHARACTER*(*) NAME |
IN: name of frame |
INTEGER DATTYP |
IN: data type |
INTEGER IOMODE |
IN: opening mode, F_O_MODE or F_X_MODE |
INTEGER FILTYP |
IN: file type |
INTEGER NAXIS |
IN: no. of dimensions |
INTEGER NPIX(1) |
IN: no. of pixels per axis |
DOUBLE PRECISION START(1) |
IN: start values |
DOUBLE PRECISION STEP(1) |
IN: stepsizes |
CHARACTER*(*) IDENT |
IN: ASCII identification for frame |
CHARACTER*(*) CUNIT |
IN: unit of each axis + data |
INTEGER PNTR |
OUT: pointer to mapped data |
INTEGER NO |
OUT: file id of frame |
INTEGER STAT |
OUT: status ( 0 = o.k. ) |
- Purpose:Create new image frame, map it and store standard descriptors
- Algorithm:call STFCRE, STFMAP and STDWRx routines
- Remarks:for a detailed description of the parameters , see text for STF...
and STD... routines
Module Version
[3.00]
(15-Jan-1992)
Module STK
Author: K. Banse ESO - Garching
Language: F77
Classification: standard interfaces, keyword data base
Environment:
- VMS and UNIX
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DEF.INC
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DAT.INC
Comments:
This module contains the routines to interact with the keywords of MIDAS.
The functions provided are:
- Find keywords and get information about them (STKFND, STKINF)
- Prompt for keywords (STKPRC, STKPRD, STKPRI, STKPRR)
- Read contents of keywords (STKRDC, STKRDD, STKRDI, STKRDR)
- Write contents of keywords (STKWRC, STKWRD, STKWRI, STKWRR)
Main arguments used by the routines are:
- KEY
- name of keyword, max. 8 chars. long and must begin with an
alphabetic char.
- FELM
- first element to be accessed, the very first element is indicated
by 1
- MAXS
- maximum number of elements required.
- ACTS
- actual number of elements accessed, value returned by the
routine.
- KUN
- unit of keyword, currently not implemented - just used as a
placeholder for now.
- KNUL
- no. of null values in keyword, currently not implemented - just
used as a placeholder for now.
- STAT
- return status.
Subroutine
STKFND
STKFND(KEY,TYPE,NOELM,BYTELM,STAT)
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
CHARACTER*(*) TYPE |
OUT: type of keyword |
INTEGER NOELM |
OUT: no. of elements in keyword |
INTEGER BYTELM |
OUT: bytes per element |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:find keyword `KEY' and provide info about it
- Algorithm:use low level functions to find key + related info
- Remarks:returned TYPE = I for integer, = R for real, = D for double precision,
= C for character keywords; if key not found TYPE = ' ' (a blank) is returned
Subroutine
STKINF
STKINF(NPOS,FNO,BUF,NUMBUF,STAT)
INTEGER NPOS |
IN: position of keyword in data base, beginning with 1 |
INTEGER FNO |
IN: info flag: 1 = name, 2 = type, 3 = size |
CHARACTER*(*) BUF |
OUT: char. info buffer (FNO = 1, 2) |
INTEGER NUMBUF |
OUT: numerical info buffer (FNO = 3) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Provide info about keyword at position `NPOS'
- Algorithm:go through the keywords directory and provide the desired info
for `FNO' = 1,2 the character buffer is filled, else the numerical output buffer
Subroutine
STKPRC
STKPRC(PROMPT,KEY,NOELM,FELM,MAXS,ACTS,VALS,KUN,KNUL,STAT)
CHARACTER*(*) PROMPT |
IN: prompt string |
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
INTEGER NOELM |
IN: no. of bytes per data value |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to get |
INTEGER ACTS |
OUT: actual no. of elements returned |
CHARACTER*(*) VALS |
OUT: buffer for data values |
INTEGER KUN |
OUT: units (not used yet...) |
INTEGER KNUL |
OUT: no. of null values (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Display prompt string and read character keyword data from terminal
- Algorithm:`ACTS' will be set to the actual no. of values returned.
- Remarks:`NOELM' larger than 1 enables you to use character arrays, where
each data value is in effect a char. string of `NOELM' bytes.
Subroutine
STKPRD
STKPRD(PROMPT,KEY,FELM,MAXS,ACTS,VALS,KUN,KNUL,STAT)
CHARACTER*(*) PROMPT |
IN: prompt string |
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to get |
INTEGER ACTS |
OUT: actual no. of elements returned |
DOUBLE PRECISION VALS(1) |
OUT: buffer for data values |
INTEGER KUN |
OUT: units (not used yet...) |
INTEGER KNUL |
OUT: no. of null values (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Display prompt string and read double precision keyword data from terminal
- Algorithm:`ACTS' will be set to the actual no. of values returned.
Subroutine
STKPRI
STKPRI(PROMPT,KEY,FELM,MAXS,ACTS,VALS,KUN,KNUL,STAT)
CHARACTER*(*) PROMPT |
IN: prompt string |
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to get |
INTEGER ACTS |
OUT: actual no. of elements returned |
INTEGER VALS(1) |
OUT: buffer for data values |
INTEGER KUN |
OUT: units (not used yet...) |
INTEGER KNUL |
OUT: no. of null values (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Display prompt string and read integer keyword data from terminal
- Algorithm:`ACTS' will be set to the actual no. of values returned.
Subroutine
STKPRR
STKPRR(PROMPT,KEY,FELM,MAXS,ACTS,VALS,KUN,KNUL,STAT)
CHARACTER*(*) PROMPT |
IN: prompt string |
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to get |
INTEGER ACTS |
OUT: actual no. of elements returned |
REAL VALS(1) |
OUT: buffer for data values |
INTEGER KUN |
OUT: units (not used yet...) |
INTEGER KNUL |
OUT: no. of null values (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Display prompt string and read real keyword data from terminal
- Algorithm:`ACTS' will be set to the actual no. of values returned.
Subroutine
STKRDC
STKRDC(KEY,NOELM,FELM,MAXS,ACTS,VALS,KUN,KNUL,STAT)
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
INTEGER NOELM |
IN: no. of bytes per data value |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to get |
INTEGER ACTS |
OUT: actual no. of elements returned |
CHARACTER*(*) VALS |
OUT: buffer for data values |
INTEGER KUN |
OUT: units (not used yet...) |
INTEGER KNUL |
OUT: no. of null values (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Read character keyword.
- Algorithm:`ACTS' will be set to the actual no. of values returned.
- Remarks:`NOELM' larger than 1 enables you to use character arrays, where
each data value is in effect a char. string of `NOELM' bytes.
Subroutine
STKRDD
STKRDD(KEY,FELM,MAXS,ACTS,VALS,KUN,KNUL,STAT)
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to get |
INTEGER ACTS |
OUT: actual no. of elements returned |
DOUBLE PRECISION VALS(1) |
OUT: buffer for data values |
INTEGER KUN |
OUT: units (not used yet...) |
INTEGER KNUL |
OUT: no. of null values (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Read double precision keyword.
- Algorithm:`ACTS' will be set to the actual no. of values returned.
Subroutine
STKRDI
STKRDI(KEY,FELM,MAXS,ACTS,VALS,KUN,KNUL,STAT)
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to get |
INTEGER ACTS |
OUT: actual no. of elements returned |
INTEGER VALS(1) |
OUT: buffer for data values |
INTEGER KUN |
OUT: units (not used yet...) |
INTEGER KNUL |
OUT: no. of null values (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Read integer keyword.
- Algorithm:`ACTS' will be set to the actual no. of values returned.
Subroutine
STKRDR
STKRDR(KEY,FELM,MAXS,ACTS,VALS,KUN,KNUL,STAT)
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to get |
INTEGER ACTS |
OUT: actual no. of elements returned |
REAL VALS(1) |
OUT: buffer for data values |
INTEGER KUN |
OUT: units (not used yet...) |
INTEGER KNUL |
OUT: no. of null values (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Read real keyword.
- Algorithm:`ACTS' will be set to the actual no. of values returned.
Subroutine
STKWRC
STKWRC(KEY,NOELM,VALS,FELM,MAXS,KUN,STAT)
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
INTEGER NOELM |
IN: no. of bytes per data value |
CHARACTER*(*) VALS |
IN: buffer for data values |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to write |
INTEGER KUN |
IN: units (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Write character keyword.
- Remarks:`NOELM' larger than 1 enables you to use character arrays, where
each data value is in effect a char. string of `NOELM' bytes.
Subroutine
STKWRD
STKWRD(KEY,VALS,FELM,MAXS,KUN,STAT)
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
DOUBLE PRECISION VALS(1) |
IN: buffer for data values |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to write |
INTEGER KUN |
IN: units (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Write double precision keyword.
Subroutine
STKWRI
STKWRI(KEY,VALS,FELM,MAXS,KUN,STAT)
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
INTEGER VALS(1) |
IN: buffer for data values |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to write |
INTEGER KUN |
IN: units (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Write integer keyword.
Subroutine
STKWRR
STKWRR(KEY,VALS,FELM,MAXS,KUN,STAT)
CHARACTER*(*) KEY |
IN: keyword name (max. 8 chars) |
REAL VALS(1) |
IN: buffer for data values |
INTEGER FELM |
IN: first element |
INTEGER MAXS |
IN: no. of elements to write |
INTEGER KUN |
IN: units (not used yet...) |
INTEGER STAT |
OUT: status (0 = o.k.) |
- Purpose:Write real keyword.
Module Version
[3.00]
(15-Jan-1994)
Module STST
Author: K. Banse ESO - Garching
Language: F77
Classification: standard interfaces, MIDAS environment, text
Environment:
- VMS and UNIX
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DEF.INC
- INCLUDE MID_DISK:[MIDAS.'version'.INCL]ST_DAT.INC
Comments:
This module contains the routines to link into the MIDAS environment and to
display text.
The functions provided are:
- Link to and unlink from the MIDAS environment (STSPRO, STSEPI)
- Display (and log) text (STTPUT, STTDIS)
Subroutine
STSPRO
STSPRO(PROG)
CHARACTER*(*) PROG |
IN: program name |
- Purpose:Get into the MIDAS environment.
- Algorithm:Read keywords data base, initialize File Control Table and open
logfile
- Remarks:Set the program name to the string '-1' to run the program outside
a MIDAS session
(this implies that there will be no keywords available...)
Subroutine
STSEPI
STSEPI
- Purpose:Close down MIDAS environment and stop.
Subroutine
STTPUT
STTPUT(TEXT,STAT)
CHARACTER*(*) TEXT |
IN: text string |
INTEGER STAT |
OUT: return status (0 = o.k.) |
- Purpose:Display text and store it in MIDAS logfile.
Subroutine
STTDIS
STTDIS(TEXT,FLAG,STAT)
CHARACTER*(*) TEXT |
IN: text string |
INTEGER BC |
IN: backspace count |
INTEGER STAT |
OUT: return status (0 = o.k.) |
- Purpose:Display a given character string as it is; do not (!) store it in the logfile
- Algorithm:backspace count = 0, write line normally
= 1, ..., 80, do that many backspaces, so the next message may overwrite
Next: Table Interfaces
Up: No Title
Previous: Bibliography