Документ взят из кэша поисковой машины. Адрес оригинального документа : http://sn.sai.msu.ru/~sil/mpfshelp/
Дата изменения: Tue Aug 24 18:45:56 1999
Дата индексирования: Mon Oct 1 19:31:39 2012
Кодировка:

Поисковые слова: южная атлантическая аномалия
MPFS reduction routines HELP

MPFS reduction routines HELP

Last modified: Sat Aug 21 09:32:58 1999.


List of Routines


Routine Descriptions

ADD_HEADER

[Next Routine] [List of Routines]
 NAME:
	ADD_HEADER
 PURPOSE:
	addition information from FITS-headers MPFS-frames
 DESCRIPTION: 
	The function computes the total exposure, mean value zenit distance
	and modified FITS header
 CALLING SEQUENCE:
	Result =ADD_HEADER( headers )
 CATEGORY:
	reduction MPFS-data		

 INPUTS:
	Headers = String array FITS-headers from the MPFS data

 OUTPUTS:
	Header = String array containing the header from the FITS file.
		
 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	no

 RESTRICTIONS:
	no

 NOTES:
	no

 PROCEDURES USED:
	
	Procedures:  SXADDPAR,SXADDHIST

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\add_head.pro)


CHECK_FITS

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	CHECK_FITS
 PURPOSE:
	Given a FITS array IM, and a associated FITS or STSDAS header HDR, this
	procedure will check that
		(1) HDR is a string array, and IM is defined and numeric   
		(2) The NAXISi values in HDR are appropiate to the dimensions 
                   of IM
		(3) The BITPIX value in HDR is appropiate to the datatype of IM
	If HDR contains a DATATYPE keyword (as in STSDAS files), then this is 
	also checked against the datatype of of IM
	If the UPDATE keyword is present, then FITS header will be modified, if
	necessary, to force agreement with the image array

 CALLING SEQUENCE:
	check_FITS, im, hdr, [ dimen, idltype, /UPDATE, /NOTYPE, /SDAS ]

 INPUTS:
	IM -  FITS or  STSDAS array, (e.g. as read by SXREAD or READFITS )
	HDR - FITS or  STSDAS header (string array) associated with IM

 OPTIONAL OUTPUTS:
	dimen - vector containing actual array dimensions
	idltype- data type of the FITS array as specified in the IDL SIZE
		function (1 for BYTE, 2 for INTEGER*2, 3 for INTEGER*4, etc.)

 OPTIONAL KEYWORD INPUTS:
	/NOTYPE - If this keyword is set, then only agreement of the array
		dimensions with the FITS header are checked, and not the 
		data type.
	/UPDATE - If this keyword is set then the BITPIX, NAXIS and DATATYPE
		FITS keywords will be updated to agree with the array
	/SDAS - If this keyword is set then the header is assumed to be from
		an SDAS (.hhh) file.    CHECK_FITS will then ensure that (1)
		a DATATYPE keyword is included in the header and (2) BITPIX
		is always written with positive values.
	/FITS -  If this keyword is present then CHECK_FITS assumes that it is
		dealing with a FITS header and not an SDAS header, see notes
		below.

 SYSTEM VARIBLE:
	If there is a fatal problem with the FITS array or header then !ERR is
	set to -1.   ( If the UPDATE keyword was supplied, and the header could
	be fixed then !ERR = 0.)

 PROCEDURE:
	Program checks the NAXIS1 and NAXIS2 parameters in the header to
	see if they match the image array dimensions.

 NOTES:
	An important distinction between an STSDAS header and a FITS header
	is that the BITPIX value in an STSDAS is always positive, e.g. BITPIX=32
	for REAL*4 data.    Users should use either the /SDAS or the /FITS 
	keyword if it is important whether the STSDAS or FITS convention for 
	REAL*4 data is used.     Otherwise, CHECK_FITS assumes that if a 
	DATATYPE keyword is present then it is dealing with an STSDAS header.

 MODIFICATION HISTORY:
	Written, December 1991  W. Landsman Hughes/STX to replace CHKIMHD
	No error returned if NAXIS=0 and IM is a scalar   W. Landsman  Feb 93
	Fixed bug for REAL*8 STSDAS data W. Landsman July 93
	Make sure NAXIS agrees with NAXISi  W. Landsman  October 93

(See d:\rsi\idl40\mpfs.lib\CHECK_FI.PRO)


CONV_VAX_UNIX

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
   CONV_VAX_UNIX     
 PURPOSE:
    To convert VAX IDL data types to UNIX (Sun,MIPS,etc.) IDL data types.
    The architecture is obtained from IDL sys.var. !VERSION.ARCH.   
    (Derived from the IUE procedure VAX2SUN)

 CALLING SEQUENCE:
    		var_unix = conv_vax_unix( var_vax )
 PARAMETERS:
    variable (REQ) (IO) (BIFDC) (012)
        The data variable to be converted.  This may be a scalar
	 or an array.  All IDL datatypes are valid (including structures).
	The result of the conversion is returned by the function.
 KEYWORD:  
	TARGET_ARCH = name (string) of desired target architecture
			if using this function on a VAX.
		otherwise !VERSION.ARCH is used to determine the conversion.
 EXAMPLE:
	Read a 100 by 100 matrix of floating point numbers from a data
	file created on a VAX.  Then convert the matrix values into Sun format.

	IDL> openr,1,'vax_float.dat'
	IDL> data = fltarr(100,100)
	IDL> readu,1,data
	IDL> data = conv_vax_unix( data )

 MODIFICATION HISTORY:
       Written   F. Varosi               August 1990
       Modified  P. Keegstra             April 1992
           			Implemented MIPSEL architecture

(See d:\rsi\idl40\mpfs.lib\CONV_VAX.PRO)


CORRSENT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	CORRSENT
 PURPOSE:
	correction spectral sensitivity
 DESCRIPTION:
	The function computes the absolute spectral distribution in reduced
	2-dimensional array MPFS-spectra in erg/cm^2/sec/A.
	Routine read vector spectral sensitivity
	from disk in working directory with standard name 'sent.fts',
	sky-substraction linearised spectra (filename='*-sky.fts', where
	image_type='*')	and modified FITS header

 CALLING SEQUENCE:
	CORRSENT, LOG,file_name,PLOT=plot
 CATEGORY:
	reduction MPFS-data

 INPUTS:
	LOG = String scalarfile name of FITS-header from the LOG observation MPFS data
	image_type= string scalar ( value 'obj' or 'test'

 OUTPUTS:
	Saved in working directory in file '*_abs.fts'

 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	PLOT - if present  then plotted spectra central part lens array to display,
	else save plot to POSTSCRIPT file in working directory with name '*.ps'

 RESTRICTIONS:
	no

 NOTES:
	no

 PROCEDURES USED:
	Function :   DEF_WDIR,READ_FTS,SXPAR,OS_FAMILY

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\corrsent.pro)


COSIN_APOD

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	COSIN_APOD

 PURPOSE:
	Apodize a 1-D data set with a cosine apodizing function.

 CALLING SEQUENCE:
	Result = COSIN_APOD(N,P)

 INPUTS:
	N = number of points of the data set.

 OPTIONAL INPUTS:
	P = dimension of the cosine function, in percentage of N.
		Default is 10 %.

 OUTPUT:
	Result = a cosine window function.

 KEYWORDS:
	None.

 COMMON BLOCKS:
	None.

 SIDE EFFECTS:
	None.

 RESTRICTIONS:
	None.

 PROCEDURE:
	The two edges of the output array are multiplied by a cosine
	function.

 MODIFICATION HISTORY:
	Written by Roberto Luis Molowny Horas, January 1994.

(See d:\rsi\idl40\mpfs.lib\cosin_ap.pro)


COSMETIC

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	COSMETIC
 PURPOSE:
	replace  bad column in CCD-frame
 DESCRIPTION: 
	
 CALLING SEQUENCE:
	Result=COSMETIC(image_in,bad_column)
 CATEGORY:
	reduction MPFS-data		

 INPUTS:
	image_in = 2-dimensional float array  CCD-frame MPFS-data
	bad_column = 1-dimensional integer array value bad column

 OUTPUTS:
	Result = 2-dimensional float array 
		
 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	no	

 RESTRICTIONS:
	no

 NOTES:
	no

 PROCEDURES USED:
	no

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\cosmetic.pro)


CREA_DISPER

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	CREA_DISPER
 PURPOSE:
      Identefication comparison spectra & creation array coefficient dispersion curve
 DESCRIPTION: 
	The routine compare position lines in  2D-array comparison MPFS-spectrum 
	(from file 'neon_s.fts') with tabulated wavelength from file 'LINES.TAB',
	 and create after 2-dimensional
	 polynomial approximation array dispersion coefficients
	
 CALLING SEQUENCE:
	CREA_DISPER,LOGFILE,FWHM,N_deg,PLOT=plot

 CATEGORY:
	reduction MPFS-data		

 INPUTS:
	LOG = String scalar of file name  FITS-header from the LOG observation
	FWHM = width spectral lines in px
	N_deg = degree of 2D-polynomial approximation dispersion curve

 OUTPUTS:
	 2-dimensional ( N_deg+1) x N_spectra float array coefficient dispersion curve,
        saved to the disk in  working directory with  standard name 'disper.fts' and
	 print in file 'disper.txt'. 
	 Last value in every string is rms approximation i px			
		
 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	PLOT - if present 2-d errors of approximation plotted to display,
	else save plot to POSTSCRIPT file in working directory with name 'err_line.ps'	

 RESTRICTIONS:
	no
 NOTES:
	no

 PROCEDURES USED:
	Function :   DEF_WDIR,DEF_RDIR,DEF_NAME,READ_FTS,INP_WAVE
	Procedures:  CRSPROD,GOODPOLY

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\crea_dis.pro)


CREA_TRA

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	CREA_TRA
 PURPOSE:
	creation traectory for every spectra
 DESCRIPTION: 
	Routine interpolated traectory etalon spectra from file 'eta_tra.fts'
	in working directory in position every fiber. Routine used table
	position etalon fiber from file 'ETALON.POS' and spectra fiber
	 (file 'FIBER.POS'). Result save in file 'fib_tra.fts'
	
 CALLING SEQUENCE:
	CREA_TRA, LOGFILE
 CATEGORY:
	reduction MPFS-data		

 INPUTS:
	LOGFILE = file name of LOG observation (in format FITS-header)

 OUTPUTS:
	saved in file 'fib_tra.fts'
		
 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	no	

 RESTRICTIONS:
	no

 NOTES:
	no

 PROCEDURES USED:
	Function :	DEF_WDIR

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\crea_tra.pro)


CROSS_NORM

[Previous Routine] [Next Routine] [List of Routines]
NAME: 
      CROSS_NORM
 
CLASS: 

    cross-correlation 
 
CATEGORY: 
 
PURPOSE: 
 
   To compute a cross correlation for two spectral segments 
   which are sampled on the same linear or log(lambda) scale,normalised at 
   dispersion
 
CALLING SEQUENCE: 
 
   result=CROSS_NORM(FFIR,FSEC,NSPR) 
 
PARAMETERS: 
 
   FFIR    (REQ) (I)  (1) (F) 
           Required input vector giving the flux data for the first  
           spectrum. 
 
   FSEC    (REQ) (I)  (1) (F)  
           Required input vector giving the flux data for the second   
           spectrum.  
  
   NSPR    (REQ) (I)  (0) (F)  
           Required input parameter specifying the spectral range to  
           be considered in the cross-correlation function.  
  
  
EXAMPLES:  
  
    To compute the cross-correlation function for two spectra, FIRST  
    and SECOND, using the recommended initial spectral range from CRSCOR,  
  
    result=CROSS_NORM(FIRST,SECOND)
  
SYSTEM VARIABLES USED:  
  
INTERACTIVE INPUT:  
  
SUBROUTINES CALLED:  
  
    PARCHECK  
  
FILES USED:  
  
SIDE EFFECTS:  
  
RESTRICTIONS:  
  
NOTES:  
       Assumes same number of elements in both spectra. (Both fluxes are  
       divided by the number of elements in the first spectrum.)  
  
PROCEDURE:  
  
     CROSS is determined for (2*nspr + 1) tags or shifts going from -15  
     to +15 shifts from the starting locations.   
     After subtracting the average flux from each spectrum, the cross  
     correlation function is computed as follows for each point in   
     the spectra,   
      TEMP = (second spectrum) * SHIFT(first spectrum,ns)  
      CROSS(L) = TOTAL(TEMP(ls:us)/nele)   
  
  
MODIFICATION HISTORY:  
  
	25 Jun 1991  PJL cleaned up; added PARCHECK and parameter eq 0  
			 print; tested on SUN and VAX; updated prolog  
  

(See d:\rsi\idl40\mpfs.lib\CROSS_N.PRO)


CRSPROD

[Previous Routine] [Next Routine] [List of Routines]
NAME: 
      CRSPROD 
 
CLASS: 

    cross-correlation 
 
CATEGORY: 
 
PURPOSE: 
 
   To compute a normalized cross correlation for two spectral segments 
   which are sampled on the same linear or log(lambda) scale.  
 
CALLING SEQUENCE: 
 
   CRSPROD,FFIR,FSEC,NSPR,CROSS,CRMIN,CRMAX 
 
PARAMETERS: 
 
   FFIR    (REQ) (I)  (1) (F) 
           Required input vector giving the flux data for the first  
           spectrum. 
 
   FSEC    (REQ) (I)  (1) (F)  
           Required input vector giving the flux data for the second   
           spectrum.  
  
   NSPR    (REQ) (I)  (0) (F)  
           Required input parameter specifying the spectral range to  
           be considered in the cross-correlation function.  
  
   CROSS   (REQ) (O)  (1) (F)  
           Required output vector containing the cross-correlation   
           function.  
  
   CRMIN   (REQ) (O)  (0) (F)  
           Required output vector containing the minimum of the   
           cross-correlation function.   
  
   CRMAX   (REQ) (O)  
           Required output vector containing the maximum of the   
           cross-correlation function.   
  
EXAMPLES:  
  
    To compute the cross-correlation function for two spectra, FIRST  
    and SECOND, using the recommended initial spectral range from CRSCOR,  
  
    CRSPROD,FIRST,SECOND,15,CROSS,CRMIN,CRMAX  
  
SYSTEM VARIABLES USED:  
  
INTERACTIVE INPUT:  
  
SUBROUTINES CALLED:  
  
    PARCHECK  
  
FILES USED:  
  
SIDE EFFECTS:  
  
RESTRICTIONS:  
  
NOTES:  
       Assumes same number of elements in both spectra. (Both fluxes are  
       divided by the number of elements in the first spectrum.)  
  
PROCEDURE:  
  
     CROSS is determined for (2*nspr + 1) tags or shifts going from -15  
     to +15 shifts from the starting locations.   
     After subtracting the average flux from each spectrum, the cross  
     correlation function is computed as follows for each point in   
     the spectra,   
      TEMP = (second spectrum) * SHIFT(first spectrum,ns)  
      CROSS(L) = TOTAL(TEMP(ls:us)/nele)   
  
  
MODIFICATION HISTORY:  
  
	25 Jun 1991  PJL cleaned up; added PARCHECK and parameter eq 0  
			 print; tested on SUN and VAX; updated prolog  
  

(See d:\rsi\idl40\mpfs.lib\crsprod.pro)


CUBE_CLE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	CUBE_CLE
 PURPOSE:
	cleaning cosmic hits in data cube
 DESCRIPTION: 
	
 CALLING SEQUENCE:
	Result = CUBE_CLE( image, tresh )

 CATEGORY:
	reduction MPFS-data		

 INPUTS:
	image - cube of data in 2D-view : array Nz x (Nx*Ny) elements for cleaning
	tresh - level discrimination data in sigma (typical value 10)
 OUTPUTS:
	Result - cleaned cube
		
 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	no	

 RESTRICTIONS:
	no

 NOTES:
	no

 PROCEDURES USED:
	

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\cube_cle.pro)


DATATYPE

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       DATATYPE
 PURPOSE:
       Datatype of variable as a string (3 char or spelled out).
 CATEGORY:
 CALLING SEQUENCE:
       typ = datatype(var, [flag])
 INPUTS:
       var = variable to examine.         in
       flag = output format flag (def=0). in
 KEYWORD PARAMETERS:
       Keywords:
         /DESCRIPTOR returns a descriptor for the given variable.
           If the variable is a scalar the value is returned as
           a string.  If it is an array a description is return
           just like the HELP command gives.  Ex:
           datatype(fltarr(2,3,5),/desc) gives
             FLTARR(2,3,5)  (flag always defaults to 3 for /DESC).
 OUTPUTS:
       typ = datatype string or number.   out
          flag=0    flag=1      flag=2    flag=3
          UND       Undefined   0         UND
          BYT       Byte        1         BYT
          INT       Integer     2         INT
          LON       Long        3         LON
          FLO       Float       4         FLT
          DOU       Double      5         DBL
          COM       Complex     6         COMPLEX
          STR       String      7         STR
          STC       Structure   8         STC
          DCO       DComplex    9         DCOMPLEX
 COMMON BLOCKS:
 NOTES:
 MODIFICATION HISTORY:
       Written by R. Sterner, 24 Oct, 1985.
       RES 29 June, 1988 --- added spelled out TYPE.
       R. Sterner, 13 Dec 1990 --- Added strings and structures.
       R. Sterner, 19 Jun, 1991 --- Added format 3.
       R. Sterner, 18 Mar, 1993 --- Added /DESCRIPTOR.
       R. Sterner, 1995 Jul 24 --- Added DCOMPLEX for data type 9.
       Johns Hopkins University Applied Physics Laboratory.

 Copyright (C) 1985, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.

(See d:\rsi\idl40\mpfs.lib\DATATYPE.PRO)


DEF_NAME

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	DEF_NAME
 PURPOSE:
	definition filename of different type exposure MPFS-data
 DESCRIPTION: 
	
 CALLING SEQUENCE:
	Result=DEF_NAME(FILELOG,TYPE_EXP,N_EXP)

 CATEGORY:
	reduction MPFS-data		

 INPUTS:
	LOGFILE = file name of LOG observation (in format FITS-header)
	TYPE_EXP = string scalar type exposure (values: 'bias','obj','star','flat',
		   'eta','star','test')

 OUTPUTS:
	Result = string scalar filename for reading (without extention)
		
 OPTIONAL OUTPUT:
	N_exp - number exposures with every value TYPE_EXP

 OPTIONAL INPUT KEYWORDS:
	no	

 RESTRICTIONS:
	no

 NOTES:
	no

 PROCEDURES USED:
	SXPAR

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\def_name.pro)


DEF_RDIR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	DEF_RDIR
 PURPOSE:
	DEFINIRION DIRECTORY FOR READING DATA FROM LOG FILE
 DESCRIPTION: 
	
 CALLING SEQUENCE:
	Result=DEF_RDIR(FILELOG)

 CATEGORY:
	reduction MPFS-data		

 INPUTS:
	LOGFILE = file name of LOG observation (in format FITS-header)
	

 OUTPUTS:
	Result = string scalar name directory for reading 
		
 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	no	

 RESTRICTIONS:
	no

 NOTES:
	no

 PROCEDURES USED:
	SXPAR

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\def_rdir.pro)


DEF_SENT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	DEF_SENT
 PURPOSE:
      definition  spectral sensitivity
 DESCRIPTION: 
	routine used linearised MPFS-spectra of standard star (filename in working
	directory 'star_lin.fts'), information from FITS-header about total exposure,
	gain CCD, mean value zenit distance for calculation observed flux. Observed 
	flux compare with absolute energy distribution star.
	Routine used ASCII data files for the Oke (AJ,99, 1621, 1990) optical
	spectrophotometric standard stars	
 CALLING SEQUENCE:
	DEF_SENT, LOGFILE, PLOT=plot
 CATEGORY:
	reduction MPFS-data		
 INPUTS:
	LOGFILE = file name of LOG observation (in format FITS-header)	
 OUTPUTS:
	 in working directory saved 1-dimensional  float array spectral sensitivity
	 in  erg/cm^2/sec/A per ADU (standard filename 'sent.fts');        				
 OPTIONAL OUTPUT:
	no
 OPTIONAL INPUT KEYWORDS:
	PLOT - if present the  curve DQE  plotted to display,
	else save plot to POSTSCRIPT file in working directory with name 'DQE.ps'	
 RESTRICTIONS:
	no
 NOTES:
	no;
 PROCEDURES USED:
	Function :   DEF_WDIR,NAME_TAB,READ_FTS,INP_WAVE,OS_FAMILY
	Procedures:  SXPAR,SXADDPAR,MKHDR
 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\def_sent.pro)


DEF_SHIFT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	DEF_SHIFT
 PURPOSE:
	definition  shift between two image in any direction
 DESCRIPTION: 
	
 CALLING SEQUENCE:
	Result = DEF_SHIFT ( image1, image2, coord, c, w)
 CATEGORY:
	reduction MPFS-data		

INPUTS :
      image1 and image2 - images to be shifted
      coord - string scalar define shift direction (value 'x' or 'y')
      c - magnification for calculation cross-correlation
      w - width band integration in cross-shift direction

 OUTPUTS:
	Result = float scalar
		
 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	no	

 RESTRICTIONS:
	no

 NOTES:
	no

 PROCEDURES USED:
	CRSPROD

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\DEF_SHI.PRO)


DEF_WDIR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	DEF_WDIR
 PURPOSE:
	DEFINIRION DIRECTORY FOR WRITING DATA 
 DESCRIPTION: 
	
 CALLING SEQUENCE:
	Result=DEF_WDIR(FILELOG)

 CATEGORY:
	reduction MPFS-data		

 INPUTS:
	LOGFILE = file name of LOG observation (in format FITS-header)
	

 OUTPUTS:
	Result = string scalar name directory for writing
		
 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	no	

 RESTRICTIONS:
	no

 NOTES:
	no

 PROCEDURES USED:
	SXPAR

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\def_wdir.pro)


EXTRACT

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	EXTRACT
 PURPOSE:
	extraction spectra in frame MPFS-image
 DESCRIPTION: 
	Routine extracted spectra in MFPS-frame in file with standard name '*_n.fts'
	('*'=image_type) along traectory from file with standard name 'fib_tra.fts',
	for obj-fibers, and along traectory etalon (from file 'eta_tra.fts' for sky
	Routine modified FITS-header
 CALLING SEQUENCE:
	EXTRACT, LOGFILE, fwhm, image_type

 CATEGORY:
	reduction MPFS-data		

 INPUTS:
	LOGFILE = file name of LOG observation (in format FITS-header)
	fwhm = width band of spectra
	image_type = string scalar type exposure (values: 'obj','star','eta',
						'neon','test')
		   

 OUTPUTS:
	Result - array float point spectra saved to disk in working directory
	with standard name '*_s.fts'.
		
 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	no	

 RESTRICTIONS:
	no

 NOTES:
	no

 PROCEDURES USED:
	DEF_WDIR,SXADDPAR

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\extract.pro)


FDECOMP

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	FDECOMP
 PURPOSE:
	Routine to decompose a file name for any operating system

 CALLING SEQENCE:
	FDECOMP, filename, disk, dir, name, qual, version, [OSFamily = ]

 INPUT:
	filename - string file name, scalar

 OUTPUTS:
	All the output parameters are scalar strings
	disk - disk name, always '' on a Unix machine, scalar string
	dir - directory name, scalar string
	name - file name, scalar string
	qual - qualifier, set equal to the characters beyond the last "."
	version - version number, always '' on a non-VMS machine, scalar string

 OPTIONAL INPUT KEYWORD:
	OSFamily - one of the four scalar strings specifying the operating 
		system:  'vms','windows','MacOS' or 'unix'.    If not supplied,
		then OS_FAMILY() is used to determine the operating system.
 EXAMPLES:
	Consider the following file names 

	Unix:    file = '/rsi/idl40/avg.pro' 
	VMS:     file = '$1$dua5:[rsi.idl40]avg.pro;3
	Mac:     file = 'Macintosh HD:Programs:avg.pro'
	Windows: file =  'd:\rsi\idl40\avg.pro'
	
	then IDL> FDECOMP,  file, disk, dir, name, qual, version
	will return the following

		  Disk             Dir          Name        Qual     Version
	Unix:      ''            '/rsi/idl40/'  'avg'       'pro'       ''
	VMS:     '$1$dua5'       '[RSI.IDL40]'  'avg'       'pro'       '3'
	Mac:     'Macintosh HD'  ':Programs:'   'avg'       'pro'       ''
	Windows:    'd:'         \rsi\idl40\    'avg'       'pro'       ''

 NOTES:
	(1) All tokens are removed between
		1) name and qual  (i.e period is removed)
		2) qual and ver   (i.e. VMS semicolon is removed)
	(2) On VMS the filenames "MOTD" and "MOTD." are distinguished by the 
	    fact that qual = '' for the former and qual = ' ' for the latter.

 ROUTINES CALLED:
	Function GETTOK(), OS_FAMILY()
	Users with V4.0 or later can replace OS_FAMILY() with !VERSION.OS_FAMILY
 HISTORY
	version 1  D. Lindler  Oct 1986
	Include VMS DECNET machine name in disk    W. Landsman  HSTX  Feb. 94
	Converted to Mac IDL, I. Freedman HSTX March 1994
          

(See d:\rsi\idl40\mpfs.lib\FDECOMP.PRO)


FIND_ETA

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
	FIND_ETA
 PURPOSE:
      Find and creation traectory spectra etalon fibers
 DESCRIPTION:
	Routine find etalon spectra in MPFS-frame from file 'eta_n.fts' and
	create after polynomial approximation traectory etalon fibers

 CALLING SEQUENCE:
	FIND_ETA, LOGFILE, GAUSS=gauss, PLOT=plot

 CATEGORY:
	reduction MPFS-data

 INPUTS:
	LOG = String scalar of file name  FITS-header from the LOG observation

 OUTPUTS:
	 Result saved to disk in working directory in files with standard names
	 'eta_tra.fts' - 2D  float array traectory fibers
	 'eta_poly.txt' - table coefficient polynomyal approximation traectory

 OPTIONAL OUTPUT:
	no

 OPTIONAL INPUT KEYWORDS:
	GAUSS - if present  cross-dispersion profile fitted by gauss-function
	PLOT - if present 2-d errors of approximation plotted to display,
	else save plot to POSTSCRIPT file in working directory with name 'err_line.ps'

 RESTRICTIONS:
	no
 NOTES:
	no

 PROCEDURES USED:
	Function :   DEF_WDIR,READ_FTS
	Procedures:  FI_PEAK

 MODIFICATION HISTORY:
       Written by Victor Afanasiev, Special Astrophysical Observatory RAS, Jul 1999

(See d:\rsi\idl40\mpfs.lib\find_eta.pro)


FI_PE