PIA calibration

This page was created by the IDL library routine mk_html_help. For more information on this routine, refer to the IDL Online Help Navigator or type:

     ? mk_html_help

at the IDL command line prompt.

Last modified: Fri Mar 24 12:48:15 2000.


List of Routines


Routine Descriptions

CREATE_PFITS

[Next Routine] [List of Routines]
 NAME:
     	CREATE_PFITS
 PURPOSE:
		Write a PHT FITS table.
 CATEGORY:
		PIA - I/O
 CALLING SEQUENCE:
       CREATE_FITS, filename, columns, col_names, col_types

 INPUT:
	FILENAME: filename for the output file without extension
	COLUMNS:  multi-dimensional array 
       

 OPTIONAL INPUT:
       PIPELINENAME: 	string type, default is the pipeline product name
       USERNAME : 		the username line in the fits header, string type.
                  		the maximum character length is 8.
       COMMENT : 		the comment line in the fits header, string type
       VERSION : 		the version number, string type, less than 8 chars
                 		default is 0001

 OUTPUT:
	(none)

 PROCEDURES USED: 
	PIA Library:
		write_fxisoheader	
	ASTROLIB:
		fxwrite
		fxbhmake
		fxbaddcol
		fxbcreate
		fxbwrite
		fxbfinish

		
 MODIFICATION HISTORY:
       Written by: Carlos GABRIEL (ESA-SAI)			Jan. 1997

(See create_pfits.pro)


GET_RESPCHK_STR

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

 PURPOSE:
       Returns the responsivity check structure corresponding to detector
 
 CATEGORY:
	PIA - processing
       
 CALLING SEQUENCE:
       GET_RCHKSTR, Det, respchkstr

 INPUTS:
       Det: Detector name. One of: P1, P2, P3, C1, C2, SL

 OUTPUTS:
       Darkcstr: the corresponding dark current structure

 PROCEDURES USED:
	None

 MODIFICATION HISTORY:
	Written by: Jose Acosta
	May 97 Version 6.4

(See get_respchk_str.pro)


PIA_CAL_ACTRESPONS

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

 PURPOSE:
	Top level menu for Actual Responsivity handling  

 CATEGORY:
       PIA - calibration

 CALLING SEQUENCE:
       PIA_CAL_ACTRESPONS

 KEYWORD PARAMETERS:
	GROUP=group: Group leader

 COMMON BLOCKS:
	colour_indices
	phtresact
	pia_actrespons_cmn (internal)
	cactresp_edit_cmn (internal)
	cal_actresp_cmn (internal)

 PROCEDURES USED:
	PIA LIB:
		get_respstr
		pia_select_var
		pia_showstr
		pia_write_author
		pia_write_comment
		pia_write_version
		pia_xplot
		read_asc_pdetect
		read_resp
		weight_mean
		write_asc_pdetect
		write_resp
		write_respstr
       ASTRO LIB:
		boost_array
		date_conv
		fxhread
		fxpar
		match
       INTERNAL:
		resp2calu_weight_event
		resp2calu_weight
		respstruct_val_choice
		respstr_show
		respons_edit_event
		respons_edit
		crespons_edit_event
		crespons_edit
		cluresp_edit_event
		cluresp_edit
		clgresp_edit_event
		clgresp_edit
		pia_cal_respons_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC) 		March 1995
	Modified (last) by: cg, wmt			Sept 1995
	Oct 95 Version 3.5
	Processing from measurements not allowed (CG)	January 1996
	Replacing of accumulated structures added (CG)	January 1996
	Handling from export version possible (CG)	April 1997
	V6.2

(See pia_cal_actrespons.pro)


PIA_CAL_COLOUR_CORRECTION

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

 PURPOSE:
	Top level menu for colour correction file display and editing

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_COLOUR_CORRECTION

 KEYWORD PARAMETERS:
	GROUP=group: Group leader

 COMMON BLOCKS:
	colour_indices
       pia_colour_correction_cmn

 PROCEDURES USED:
	PIA LIB:
		pia_disp_print_file
       INTERNAL:
		show_cc

 MODIFICATION HISTORY:
       Written by: I. Heinrichsen		        August 1997

(See pia_cal_colour_correction.pro)


PIA_CAL_CRELIN

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

 PURPOSE:
	Top level menu for PHT CRE linearization Files production, one of
	the Calibration Files Derivation Procedures (CFDP)  

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_CRELIN

 COMMON BLOCKS:
	colour_indices
	phtcrelin

 PROCEDURES USED:
	PIA LIB:
		pia_multchoice
		pia_xplot
		pia_xsurface
		read_crelin
		write_crelin
       ASTRO LIB:
		fxread
       INTERNAL:
		crelin_edit
		crelin_edit_event
		ccrelin_edit
		ccrelin_edit_event
		pia_crelin_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC) 		March 1995
	Modified (last) by: (CG)			September 1995
	Oct 95 Version 3.5
	Processing button deleted (CG)			April 1997
	Version 6.2
	Re-initialize button added (CG)			November 1997
	V6.6
	Format for editing added (CG)			January 1999
	V7.3
	/Modal use according to IDL >=5.0 (CG)		February 1999
	V7.3.1

(See pia_cal_crelin.pro)


PIA_CAL_DARKCUR

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

 PURPOSE:
	Top level menu for Dark Current File production, one of
	the Calibration Files Derivation Procedures (CFDP)  

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_DARKCUR

 COMMON BLOCKS:
	colour_indices
	phtcap
	phtdarkcur
	pia_caldark_cmn (internal)
	darkc2calu_cmn (internal)
	cdark_edit_cmn (internal_)
	cal_pdet (internal)
	pia_dspchz_cmn (internal)
	
 PROCEDURES USED:
	PIA LIB:
		get_darkcstr
		get_darkcur
		phtcap_init
		pia_multchoice
		pia_select_var
		pia_showstr
		pia_write_author
		pia_write_version
		pia_xplot
		read_asc_pdetect
		weight_mean
		write_asc_pdetect
		write_darkcstr
		write_detdarkcur
       ASTRO LIB:
		avg
		boost_array
		date_conv
		fxhread
		fxpar
		match
       INTERNAL:
		darkc2calu_weight_event
 		darkc2calu_weight
		darkc_struct_val_choice
		darkcstr_show
		darkcur_edit_event
		darkcur_edit
		cludarkcur_edit_event
		cludarkcur_edit
		clgdarkcur_edit_event
		clgdarkcur_edit
		pia_cal_darkcur_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC)		March 1995
	Modified (last) by: CG, WMT			September 1995
	Oct 95 Version 3.5
	Cal G overplot added (CG)			December 1995
	The final value of dark current and min NEP is 
	taken as the median value, not as weighted 
	mean  [Rout:DARKC_STRUCT_VAL_CHOICE] (J.Acosta)	March 1996 
	Processing can start from SCP level (J.Acosta0	October 1996
	Handling from export version possible (CG)	April 1997
	V6.2
	Bug for non-existence of cal_struct fixed (CG)	May 1997
	V6.3 
	Change the access to calsave files (JA)		Oct 1997
	V6.5
	/Modal use according to IDL >=5.0 (CG)		February 1999
	V7.3.1

(See pia_cal_darkcur.pro)


PIA_CAL_DARKCUR_ORB

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

 PURPOSE:
	Top level menu for orbital position dependant Dark Currents File 

 CATEGORY:
       PIA - calibration

 CALLING SEQUENCE:
       PIA_CAL_DARKCUR_orb

 COMMON BLOCKS:
	colour_indices
	phtcap
	phtdarkorb
	pia_caldark__orb_cmn (internal)
	
 PROCEDURES USED:
	PIA LIB:
		pia_xplot
		read_darkorb
		pia_cal_darkcur_orb_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/VILSPA-SAI)			Feb.98
	V7.0		

(See pia_cal_darkcur_orb.pro)


PIA_CAL_DARKCUR_PROC

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

 PURPOSE:
	Calibration Files Derivation Procedures (CFDP)  
	corresponding to the Dark Current File production

 CATEGORY:
          PIA - processing

 CALLING SEQUENCE:
       PIA_CAL_DARKCUR_PROC, det, newdarkcurr, cal_darkc_str, newnep

 INPUT:
       det: String indicating the detector 

 OUTPUT:
	newdarkcurr: computed dark current
	cal_darkc_str: computed dark currents structure
	newnep: computed minimum NEP

 COMMON BLOCKS:
	deglitch_param
	phtcs
	phtacc
	phtcap
	phterd
	phtresdef
	phtscp
	phtsrd
	gencho (internal)

 PROCEDURES USED:
	PIA LIB:
		deglitch_param_init
		lin_voltages
		phtcap_init
		pia_cal_darkcur
		pia_gencho
		pia_load_ierd
		pia_load_isrd
		pia_pickfile
		pia_rodisc
		pia_sigdisc
		pickmeas
		process_erd
		process_srd
		read_erd
		read_resp
		set_orbpos
		weight_mean
       ASTRO LIB:
		boost_array

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC)                     	January 1995
	Modified (last) by: CG					July 1995
	Oct 95 Version 3.5
	Ramp deglitching added (CG)				December 1995
	NEP calculation modified (JACOSTA)			March 1996
	The final value of dark current and min NEP is taken
	as the median value, not as weighted mean (J.Acosta)	March 1996 
	From_SRD option included (CG)				June 1996
	Change way of computing orbital pos. (JAcosta)		October 1996
	Bug for first SCP element + add Proc_date to 
	cumulated structure    (JAcosta)			October 1997
	V6.5

(See pia_cal_darkcur_proc.pro)


PIA_CAL_DEFRESP_ORB

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

 PURPOSE:
	Top level menu for orbital position dependant Default Responses files 

 CATEGORY:
       PIA - calibration

 CALLING SEQUENCE:
       PIA_CAL_DEFRESP_orb

 COMMON BLOCKS:
	colour_indices
	phtcap
	phtresporb
	pia_caldresp__orb_cmn (internal)
	
 PROCEDURES USED:
	PIA LIB:
		pia_xplot
		read_resporb
		pia_cal_defresp_orb_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/VILSPA-SAI)			Feb.98
	V7.0		

(See pia_cal_defresp_orb.pro)


PIA_CAL_DIETRAN

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

 PURPOSE:
	Top level menu for DIE1 and DIE2 (Digital Interface Electronics) 
	Files production, one of the Calibration Files Derivation 
	Procedures (CFDP)  

 CATEGORY:
          PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_DIETRAN

 KEYWORD PARAMETERS:
	GROUP=group: group leader

 COMMON BLOCKS:
	phtdietrans
	pia_dietran_cmn (internal)

 PROCEDURES USED:
	PIA LIB:
		pia_write_comment
		pia_write_version
		write_dietrans
       INTERNAL:
		dietran_edit_event
		dietarn_edit
		cdietarn_edit_event
		cdietran_edit
		pia_cal_dietran_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC) 		March 1995
	Modified (last) by: CG				September 1995
	Oct 95 Version 3.5
	Re-initialize button added (CG)			November 1997
	V6.6
	/Modal use according to IDL >=5.0 (CG)		February 1999
	V7.3.1

(See pia_cal_dietran.pro)


PIA_CAL_FCSILL

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

 PURPOSE:
	Top level menu for FCS illumination File production, one of
	the Calibration Files Derivation Procedures (CFDP)  

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_FCSILL

 KEYWORD PARAMETERS:
	Group=group: Group leader

 COMMON BLOCKS:
	colour_indices
	phtillum
	pia_verselectedf_cmn (internal)
 	pia_fcsil_cmn (internal)
	cfcsill_edit_cmn (internal)
	cal_fcsill_cmn (internal)
		
 PROCEDURES USED:
	PIA LIB:
		pia_write_comment
		pia_write_version
		pia_xplot
		read_fcsill
		write_illum
       ASTRO LIB:
		fxbclose
		fxbopen
		fxbread
       INTERNAL:
		fcsill_struct_val_choice
		fcsill_edit_event
		fcsill_edit
		cfcsill_edit_event
		cfcsill_edit
		clg_fcsill_edit_event
		clg_fcsill_edit
		pia_cal_fcsill_event
		
 MODIFICATION HISTORY:
       Written by: C. Gabriel (ES/ESTEC) 			March 1995
	Modified (last) by: CG, WMT				Sep 1995
	Oct 95 Version 3.5
	Changed for new FCSPOW cumulated structures (CG)	February 1996
	Writing Cal G fixed for C200 pipeline pixel order &
	Bug for non-existence of cal_struct fixed (CG)		May 1997
	V6.3

(See pia_cal_fcsill.pro)


PIA_CAL_FCSPOW

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

 PURPOSE:
	Top level menu for PHT FCS power Files production, one of
	the Calibration Files Derivation Procedures (CFDP)  

 CATEGORY:
       PIA - calibration menues

 CALLING SEQUENCE:
       PIA_CAL_FCSPOW

 KEYWORD PARAMETERS:
	GROUP=group: Group leader

 COMMON BLOCKS:
		colour_indices
		phtfcs
		phtfilter
		phtoptpow
		pia_varselected_cmn (internal)
		pia_fcsp_cmn (internal)
		cfcs_edit_cmn (internal)
		calu_fcspow (internal)
		calg_fcs (internal)
		
 PROCEDURES USED:
	PIA Lib:
		get_fcspstr
		phtfilter_init
		pia_disp_print_file
		pia_multchoice
		pia_select_var
		pia_showstr
		pia_write_author
		pia_write_comment
		pia_write_version
		pia_xplot
		pia_xsurface
		read_asc_fcspow
		read_fcspow
		write_asc_fcspow
		write_fcspow
		write_fcspstr
	Astro Lib:
		avg
		bsort
		date_conv
		fxread
		match
		sigma
       INTERNAL:
		fcsp_struct_val_coice
		fcspstr_show
		fcspow_edit_event
		fcspow_edit
		cfcspow_edit_event
		cfcspow_edit
		clufcspow_edit_event
		clufcspow_edir
		pia_cal_fcspow_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC) 		March 1995
	Modified (last) by: Jose Acosta (IAC)		June 1996
	Version 5.0 	August 1996
	Handling from export version possible (CG)	April 1997
	V6.2
	Bug for non-existence of cal_struct fixed (CG)	May 1997
	V6.3 
	/Modal use according to IDL >=5.0 (CG)		February 1999
	V7.3.1

(See pia_cal_fcspow.pro)


PIA_CAL_FCSPOW_CROS

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

 PURPOSE:
	Calibration Files Derivation Procedures (CFDP)  
	corresponding to the FCS power tables File production -
	FCS1-FCS2 cross calibration part

 CATEGORY:
       PIA - processing

 CALLING SEQUENCE:
       PIA_CAL_FCSPOW_CROS, det, fcstab

 INPUT:
       det: String indicating the detector
	fcstab: FCS Power table to be used

 KEYWORD PARAMETERS:
	fcs_nr:	Number of FCS measurements performed in the cob - Def=4

 OUTPUT:
	none

 COMMON BLOCKS:
	deglitch_param
	phtapertures
	phtcs
	phterd
	phtscp
	phtsrd
	phtfilter
	gencho 
	pia_cal_fcspow_proc_cmn (internal)
	pia_cal_fcspow_proc_res (containing the results):
		heatpow: Flt(fcs_nr) Array:  FCS heating powers used in the  
				calibration sequence
	 	fcspow: Flt(pixels,fcs_nr) Array: computed optical in-band powers 
	 	fcspun: uncertainties of fcspow
	 	cal_fcspow_str: computed fcs-in-band-powers structure
	 	cal_fcspre_str: computed pre_reduced signal table

 PROCEDURES USED:
	PIA LIB:
		aperture_size_init
		deglitch_param_init
		get_wheels
		lin_voltages
		phtfilter_init
		pia_cal_fcspow
		pia_gencho
		pia_load_ierd
		pia_load_iscp
		pia_load_isrd
		pia_pickfile
		pia_rodisc
		pia_sigdisc
		pickmeas
		process_erd
		process_tmpsrd
		read_cs
		read_erd
		weight_mean
       ASTRO LIB:
		date_conv
	INTERNAL:
		pia_cal_fcspow_proc_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel  (ESA/ESTEC-SAI)             November 1995
	Ramp deglitching + stability analysis added (CG)    February 1996
	Bug in structure & overplot fixed (CG)		    February 1996
	Bug with identification of C100 filter fixed (CG)   April 1996
	Change calculation of orbital position	(JAcosta)   October 1996
			

(See pia_cal_fcspow_cros.pro)


PIA_CAL_FCSPOW_PROC

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

 PURPOSE:
	Calibration Files Derivation Procedures (CFDP)  
	corresponding to the FCS power tables File production

 CATEGORY:
       PIA - processing

 CALLING SEQUENCE:
       PIA_CAL_FCSPOW_PROC, det, heatpow, fcspow, fcspun, cal_fcspow_str

 INPUT:
       det: String indicating the detector

 KEYWORD PARAMETERS:
	source: Name of Calibration Source used
	inbflux: In-band flux of Calibration Source used [W/pixel] 
	qb_star: Number of photons / second on detector for the filter used
	fcs_nr:	Number of FCS measurements performed in the cob - Def=4
	orbit_pos: Orbital position at time of cob begin

 OUTPUT:
	none

 COMMON BLOCKS:
	deglitch_param
	phtapertures
	phtcs
	phterd
	phtppsf
	phtscp
	phtsrd
	phtfilter
	gencho 
	pia_get_inbp_res
	pia_cal_fcspow_proc_cmn (internal)
	pia_cal_fcspow_proc_res (containing the results):
		heatpow: Flt(fcs_nr) Array:  FCS heating powers used in the  
				calibration sequence
	 	fcspow: Flt(pixels,fcs_nr) Array: computed optical in-band powers 
	 	fcspun: uncertainties of fcspow
	 	cal_fcspow_str: computed fcs-in-band-powers structure
	 	cal_fcspre_str: computed pre_reduced signal table

 PROCEDURES USED:
	PIA LIB:
		aperture_size_init
		deglitch_param_init
		get_wheels
		lin_voltages
		phtfilter_init
		pia_cal_fcspow
		pia_gencho
		pia_get_inbpower
		pia_load_ierd
		pia_load_iscp
		pia_load_isrd
		pia_pickfile
		pia_rodisc
		pia_sigdisc
		pickmeas
		process_erd
		process_srd
		read_cs
		read_erd
		read_ppsf
		set_orbpos
		subtr_bckg
		weight_mean
       ASTRO LIB:
		date_conv
	INTERNAL:
		pia_cal_fcspow_proc_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel  (ESA/ESTEC)                    	May 1995
	Modified (last) by: cg					July 1995
	Oct 95 Version 3.5
	Bug counting for P1 fixed (CG)				December 1995
	Ramp deglitching added (CG)				December 1995
	P1 and P2 are not anymore a special case (CG)		December 1995
	Orbit position from PSF file, extension of FCSPOW
		structure (CG)					December 1995
	Processing from SRD level now possible (CG) + 
		effective int times used 
	IDL !stime instead of systime() for proc time (CG)	January 1996
	/From_SRD works also with discontinuous set (CG)	February 1996
	Drift stability analysis choice implemented (CG)	April 1996
	Processing from SCP level implemented (JA)		May 1996
	Index mistake fixed (CG)				June 1996
	Change procedure for data input	(JAcosta)		June 1996
	Change calculation of orbital position	(JAcosta)	October 1996
	Using posi from pickmeas, and new gen_choices (JAcosta) June 1997
	V6.3
			

(See pia_cal_fcspow_proc.pro)


PIA_CAL_FLATF

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

 PURPOSE:
	Top level menu for FCS illumination File production, one of
	the Calibration Files Derivation Procedures (CFDP)  

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_flatf

 KEYWORD PARAMETERS:
	Group=group: Group leader

 COMMON BLOCKS:
	colour_indices
	phtillum
	pia_verselectedf_cmn (internal)
 	pia_flatf_cmn (internal)
	cflatf_edit_cmn (internal)
	cal_flatf_cmn (internal)
		
 PROCEDURES USED:
	PIA LIB:
		pia_write_comment
		pia_write_version
		pia_xplot
		read_flatf
		write_illum
       ASTRO LIB:
		fxbclose
		fxbopen
		fxbread
       INTERNAL:
		flatf_struct_val_choice
		flatf_edit_event
		flatf_edit
		cflatf_edit_event
		cflatf_edit
		clg_flatf_edit_event
		clg_flatf_edit
		pia_cal_flatf_event
		
 MODIFICATION HISTORY:
       Written by: C. Gabriel (ES/ESTEC) 			March 1995
	Modified (last) by: CG, WMT				Sep 1995
	Oct 95 Version 3.5
	Changed for new FCSPOW cumulated structures (CG)	February 1996
	Re-initialize button added (CG)			November 1997
	V6.6

(See pia_cal_flatfield.pro)


PIA_CAL_FOOTPR

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

 PURPOSE:
	Menu for accessing and plotting the calibration files P#FOOTPR  

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_footpr

 KEYWORD PARAMETERS:
	Group=group: Group leader

 COMMON BLOCKS:
	phtfilter
		
 PROCEDURES USED:
	PIA LIB:
		pia_xsurface
		read_footpr
       ASTRO LIB:
		fxread
       INTERNAL:
		pia_cal_footpr_event
		
 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/VILSPA) 			July 1998
	V7.2

(See pia_cal_footpr.pro)


PIA_CAL_FPGC

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

 PURPOSE:
	Top level menu for Focal Plane Geometry calibration 

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_FPGC

 KEYWORD PARAMETERS:
	GROUP=group: Group leader

 COMMON BLOCKS:
	colour_indices
	pia_multi_fit_results (internal)
	pia_cal_fpgc_cmn (internal)
	pia_cal_fpgres (internal)

 PROCEDURES USED:
	PIA LIB:
		fpg_cross
		fpgc_manager
		interpol_fpgc
		pia_disp_print_file
		pia_xplot
       INTERNAL:
		pia_cal_fpgc_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC)		September 1995
	Modified by: cg					October 1995
	Oct 95 Version 3.5
	Scan direction bug fixed, CG			October 1995
			

(See pia_cal_fpgc.pro)


PIA_CAL_NDRSEL

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

 PURPOSE:
	Top level menu for NDR general Selection File production

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_NDRSEL

 KEYWORD PARAMETERS:
	GROUP=group: Group leader

 COMMON BLOCKS:
	colour_indices
	phtselndr
	pia_ndrsel_cmn (internal)
	cndrs_edit_cmn (internal)
	cal_ndrsel_cmn (internal)

 PROCEDURES USED:
	PIA LIB:
		pia_write_comment
		pia_write_version
		read_selndr
		write_selndr
       ASTRO LIB:
		boost_array
		fxbclose
		fxbopen
		fxbread
       INTERNAL:
		ndrsel_edit_event
		ndrsel_edit
		cndrsel_edit_event
		cndrsel_edit
		pia_cal_ndrsel_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC)		March 1995
	Modified (last) by: cg, wmt			September 1995
	Oct 95 Version 3.5
	Re-initialize button added (CG)			November 1997
	V6.6
	/Modal use according to IDL >=5.0 (CG)		February 1999
	V7.3.1

(See pia_cal_ndrsel.pro)


PIA_CAL_PPSF

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

 PURPOSE:
	Top level menu for PHT Point Spread Function File production, one of
	the Calibration Files Derivation Procedures (CFDP)  

 CATEGORY:
       PIA - graphics
		
 CALLING SEQUENCE:
       PIA_CAL_PPSF

 KEYWORD PARAMETERS:
	GROUP=group: Group leader

 COMMON BLOCKS:
	colour_indices
	phtapert
	phtfilter
	phtppsf
	pia_ppsf_cmn (internal)
	cppsf_edit_cmn (internal)
	cal_ppsf_cmn (nternal)

 PROCEDURES USED:
	PIA LIB:
		aperture_size_init
		phtfilter_init
		pia_multchoice
		pia_write_author
		pia_write_comment
		pia_write_version
		pia_xplot
		pia_xsurface
		read_asc_ppsf
		read_ppsf
		write_asc_ppsf
		write_ppsf
       ASTRO LIB:
		fxread
       INTERNAL:
		ppsf_edit_event
		ppsf_edit
		cppsf_edit_event
		cppsf_edit
		clg_ppsf_edit_event
		clg_ppsf_edit
		pia_cal_ppsf_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC) 		March 1995
	Modified (last) by: cg, wmt			September 1995
	Oct 95 Version 3.5
	Handling from export version possible (CG)	April 1997
	V6.2
	Re-initialize button added (CG)			November 1997
	V6.6
	/Modal use according to IDL >=5.0 (CG)		February 1999
	V7.3.1

(See pia_cal_ppsf.pro)


PIA_CAL_RESPCHK_PROC

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

 PURPOSE:
	Calibration Files Derivation Procedures (CFDP)  
	corresponding to responsivity check analysis

 CATEGORY:
          PIA - processing

 CALLING SEQUENCE:
       PIA_CAL_RESPCHK_PROC, det, respchkstr

 INPUT:
       det: String indicating the detector 

 OUTPUT:
	respchkstr: computed responsivity check structure

 COMMON BLOCKS:
	deglitch_param
	phtcs
	phtacc
	phterd
	phtresdef
	phtscp
	phtsrd
	pickmeas_results
	gencho (internal)

 PROCEDURES USED:
	PIA LIB:
		deglitch_param_init
		lin_voltages
		phtcap_init
		pia_cal_darkcur
		pia_gencho
		pia_load_ierd
		pia_load_isrd
		pia_pickfile
		pia_rodisc
		pia_sigdisc
		pickmeas
		process_erd
		process_srd
		read_erd
		read_resp
		set_orbpos
		weight_mean
       ASTRO LIB:
		boost_array

 MODIFICATION HISTORY:
       Written by: Jose Acosta                     		June 1997
	V6.3

(See pia_cal_respchk_proc.pro)


PIA_CAL_RESPONS

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

 PURPOSE:
	Top level menu for Response File production, one of
	the Calibration Files Derivation Procedures (CFDP)  

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_RESPONS

 KEYWORD PARAMETERS:
	GROUP=group: Group leader

 COMMON BLOCKS:
	colour_indices
	phtresdef
	resp2calu_cmn (internal)
	pia_respons_cmn (internal)
	pia_varselected_cmn (internal)
	cresp_edit_cmn (internal)
	cal_resp_cmn (internal)

 PROCEDURES USED:
	PIA LIB:
		get_respstr
		pia_select_var
		pia_showstr
		pia_write_author
		pia_write_comment
		pia_write_version
		pia_xplot
		read_asc_pdetect
		read_resp
		weight_mean
		write_asc_pdetect
		write_resp
		write_respstr
       ASTRO LIB:
		boost_array
		date_conv
		fxhread
		fxpar
		match
       INTERNAL:
		resp2calu_weight_event
		resp2calu_weight
		respstruct_val_choice
		respstr_show
		respons_edit_event
		respons_edit
		crespons_edit_event
		crespons_edit
		cluresp_edit_event
		cluresp_edit
		clgresp_edit_event
		clgresp_edit
		pia_cal_respons_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC) 		March 1995
	Modified (last) by: cg, wmt			Sept 1995
	Oct 95 Version 3.5
	Processing from measurements not allowed (CG)	January 1996
	Replacing of accumulated structures added (CG)	January 1996
	Handling from export version possible (CG)	April 1997
	V6.2
	Showing PHT-S responsivities also (CG)		September 1997
	V6.5
	Re-initialize button added (CG)			November 1997
	V6.6
	/Modal use according to IDL >=5.0 (CG)		February 1999
	V7.3.1

(See pia_cal_respons.pro)


PIA_CAL_RESPONS_PROC

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

 PURPOSE:
	Calibration Files Derivation Procedures (CFDP)  
	corresponding to the Responsivity tables File production

 CATEGORY:
          PIA - processing

 CALLING SEQUENCE:
       PIA_CAL_RESPONS_PROC, det

 INPUT:
       det: 		String indicating the detector
	source: 	Name of Calibration Source used
	flux: 		Expected flux of Calibration Source used [Jy], 
			where flux is a two elements array, and flux(0)
			is the flux and flux(1) is the uncertainty
	inbpower: 	Expected power on detector [W], where inbpower
             		is a two elements array, and inbpower(0) is the 
			power and inbpower(1) is the uncertainty

 COMMON BLOCKS:
	aperture_info
	deglitch_param
	phtcap
	phterd
	phtscp
	phtsrd
	gencho 
	pia_get_inbp_res
	pickmeas_results
	pia_cal_respons_proc_cmn (internal)
	pia_cal_respons_proc_res_cmn (for passing results)

 PROCEDURES USED:
	PIA LIB:
		deglitch_param_init
		get_wheels
		lin_voltages
		pia_cal_respons
		pia_gencho
		pia_get_inbpower
		pia_load_ierd
		pia_load_iscp
		pia_load_isrd
		pia_pickfile
		pia_rodisc
		pia_sigdisc
		pickmeas
		process_erd
		process_srd
		read_erd
		subtr_bckg
		weight_mean
		pia_fcspre_struct_val_choice
		get_fcspre_str
       ASTRO LIB:
		date_conv
	INTERNAL:
		pia_cal_respons_proc_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESETC)                     	May 1995
	Modified (last) by: cg, wmt				September 1995
	Oct 95 Version 3.5
	Pre-reduced signal tables handling +
	print + file included (CG)				November 1995
	In-band power from FITS file, extension of resp 
	  accumulated structure, only /from_table allowed (CG)	December 1995
	The orbital position was added to the responsivity 
	  accumulated structure			      (Jacosta) April 1996
	Using new pickmeas and pickmeas_results-CB (CG)		May 1997
	V6.3
			

(See pia_cal_respons_proc.pro)


PIA_CAL_SWAVL

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

 PURPOSE:
	Top level menu for SS-SL central wavelengths file production, one of
	the Calibration Files Derivation Procedures (CFDP53201)  

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_SWAVL

 KEYWORD PARAMETERS:
	GROUP=group: Group leader

 COMMON BLOCKS:
	colour_indices
	phtslwavlen
	pia_swavl_cmn (internal)
	cswavl_edit_cmn (internal)
	pia_cal_swavl_cmn (intenral)
	pia_cal_swavl_data (internal)

 PROCEDURES USED:
	PIA LIB:
		pia_cal_swavl_comp
		pia_multchoice
		pia_multi_fit
		pia_write_author
		pia_write_version
		pia_xplot
		read_asc_psssl
		set_slwavelen
		write_asc_psssl
       INTERNAL:
		swavl_edit_event
		swavl_edit
		cswavl_edit_event
		cswavl_edit
		clu_swavl_edit_event
		clu_swavl_edit
		pia_cal_swavl_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC)		June 1995
	Modified (last) by: cg, wmt			September 1995
	Oct 95 Version 3.5
	Handling from export version possible (CG)	April 1997
	V6.2
	Re-initialize button added (CG)			November 1997
	V6.6
	/Modal use according to IDL >=5.0 (CG)		February 1999
	V7.3.1
	Code bug (not accepted by IDL5.3) corrected(CG)	March 2000
	V8.2

(See pia_cal_swavl.pro)


PIA_CAL_SWAVL_COMP

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

 PURPOSE:
	Compute new central PHT SS/SL wavelengths fitting lines positions.

 CATEGORY:
	PIA - graphics

 CALLING SEQUENCE:
	PIA_CAL_SWAVL_COMP

 COMMON BLOCKS:
	phtslwavlen
	pia_cal_swavl_comp_cmn (internal)
	
 CALLED ROUTINES:
	PIA LIB:
		pia_disp_print_file
		pia_xplot
       INTERNAL:
		pia_cal_swavl_comp_event
	
 MODIFICATION HISTORY:
	Written by C.Gabriel (ESA/ESTEC)		August 1995
	Modified (last) by: cg				September 1995
	Oct 95 Version 3.5

(See pia_cal_swavl_comp.pro)


PIA_CAL_SWAVL_PROC

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

 PURPOSE:
	Calibration Files Derivation Procedures (CFDP)  
	corresponding to the PHT-S Wavelengths tables File production

 CATEGORY:
          PIA - processing

 CALLING SEQUENCE:
       PIA_CAL_SWAVL_PROC

 OUTPUT:
	MNPW: FLTARR(128,n) = mean powers of SS/SL obtained for all n raster 
		position  
	MNPU: FLTARR(128,n) = MNPW uncertainties

 COMMON BLOCKS:
	colour_indices
	deglitch_param
	phterd
	phtscp
	phtslwavlen
	phtsrd
	pickmeas_results
	gencho (internal)

 PROCEDURES USED:
	PIA LIB:
		deglitch_param_init
		get_rastersteps
		pia_gencho
		pia_load_iscp
		pia_load_isrd
		pia_pickfile
		pia_rodisc
		pia_sigdisc
		pia_xplot
		pickmeas
		process_erd
		process_scp
		process_srd
		read_erd
		weight_mean
 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/VILSPA)                   	June 1995
	Modified (last) by: cg					August 1995
	Oct 95 Version 3.5
	Using new pickmeas and pickmeas_results-CB (CG)		May 1997
	V6.3
			

(See pia_cal_swavl_proc.pro)


PIA_CAL_VIGNET

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

 PURPOSE:
	Top level menu for PHT Vignetting Files production, one of
	the Calibration Files Derivation Procedures (CFDP)  

 CATEGORY:
       PIA - graphics

 CALLING SEQUENCE:
       PIA_CAL_VIGNET

 KEYWORD PARAMETERS:
	GROUP=group: Group leader

 COMMON BLOCKS
	colour_indices
	phtfilter
	phtvignet
	pia_vign_cmn (internal)
	cvign_edit_cmn (internal)
	cal_vignet_cmn (internal)

 PROCEDURES USED:
	PIA LIB:
		phtfilter_init
		pia_multchoice
		pia_xplot
		pia_xsurface
		vignet_tables_read
		write_vign
       ASTRO LIB:
		fxread
       INTERNAL:
		vignet_edit_event
		vignet_edit
		cvignet_edit_event
		cvignet_edit
		clgvignet_edit_event
		clgvignet_edit
		pia_cal_vignet_event

 MODIFICATION HISTORY:
       Written by: C. Gabriel (ESA/ESTEC)		March 1995
	Modified (last) by: cg, wmt                     Jul 1995
	Oct 95 Version 3.5
	Handling from export version possible (CG)	April 1997
	V6.2
	Re-initialize button added (CG)			November 1997
	V6.6
	/Modal use according to IDL >=5.0 (CG)		February 1999
	V7.3.1

(See pia_cal_vignet.pro)


RESPCHK_STR_INIT

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

 PURPOSE:
       Initializes the Responsivity check Structures

 CATEGORY:
	PIA - initialisation

 CALLING SEQUENCE:
       RESPCHK_STR_INIT

 INPUTS:
       None

 OUTPUTS:
       None

 PROCEDURES USED:
       None

 MODIFICATION HISTORY:
       Written by:	Jose Acosta
	May 97 Version 6.4

(See respchk_str_init.pro)


WRITE_CHOPCOR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
     WRITE_CHOPCOR
 PURPOSE:
       Write signal losses correction factor to a FITS file

 CATEGORY:
       PIA - I/O
 CALLING SEQUENCE:
       WRITE_CHOPCOR, DET, CHOPCOR_STR, FILENAME = FILENAME
                   COMMENT = COMMENT, VERSION = VERSION

 INPUT:
       filename: fits file name without the '.FITS' extension
       det: character string of 'C1', 'C2', 'P'
       CHOPCOR_STR: structure containing the correction factor per 
		     detector 

 OPTIONAL INPUT:
       COMMENT : the comment line in the fits header, string type
       VERSION : the version number, string type, less than 8 chars
                 default is 0001

 PROCEDURES USED: 
       PIA library:
               c2p_IA2pipe: changing order of C2 pixels 

 MODIFICATION HISTORY:
       Written by: Jose Acosta  - Jan 98
       V7.0
;

(See write_chopcor.pro)


WRITE_DARKCSTR

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       WRITE_DARKCSTR
 PURPOSE:
       Append a new structure to the dark current structure corresponding 
	to det 
 CATEGORY:
	PIA - I/O
 CATEGORY:
       
 CALLED SEQUENCE:
       WRITE_RESPCHKSTR, DETECTOR_NAME, newrchkstr [,/REPLACE]
 INPUTS:
       DETECTOR_NAME: ONE OF THESE STRINGS -- P1, P2, P3, C1, C2, SL
       newrchkstr: the corresponding new responsivity check structure
 OPTIONAL INPUTS:
       NONE
 KEYWORD PARAMETERS:
       NONE
 PROCEDURE:
 MODIFICATION HISTORY:
       WRITTEN BY: Jose Acosta
	MAy 97 Version 6.4

(See write_respchkstr.pro)


WRITE_DARKORB

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
     WRITE_DARKORB
 PURPOSE:
	Write a dark current values depending on orbital position to a FITS file.
 CATEGORY:
	PIA - I/O
 CALLING SEQUENCE:
       WRITE_DARKORB, FILENAME, DET, DARKORB_STR
                   COMMENT = COMMENT, VERSION = VERSION

 INPUT:
       filename: fits file name without the '.FITS' extension
       det: character string of 'C1', 'C2', 'P'
       DARKORB_STR: 

 OPTIONAL INPUT:
       COMMENT : the comment line in the fits header, string type
       VERSION : the version number, string type, less than 8 chars
                 default is 0001

 PROCEDURES USED: 
       PIA library:
        	c2p_IA2pipe: changing order of C2 pixels 

 MODIFICATION HISTORY:
       Written by: Jose Acosta
       V6.6
;

(See write_darkorb.pro)


WRITE_FXISOHEADER

[Previous Routine] [List of Routines]
 NAME:
     	WRITE_FXISOHEADER
 PURPOSE:
		Write a PHT primary FITS header for a FITS file.
 CATEGORY:
		PIA - I/O
 CALLING SEQUENCE:
       WRITE_FXISOHEADER, FILENAME, HEADER, DATA, 
     USERNAME=USERNAME, COMMENT=COMMENT, VERSION=VERSION,EXTENSION=EXTENSION 

 INPUT:
		FILENAME: filename for the output file without extension
       

 OPTIONAL INPUT:
       PIPELINENAME: 	string type, default is the pipeline product name
       USERNAME : 	the username line in the fits header, string type.
                  	the maximum character length is 8.
       COMMENT : 	the comment line in the fits header, string type
       VERSION : 	the version number, string type, less than 8 chars
                 	default is 0001
	EXTENSION:	for binary extension files

 OUTPUT:
		HEADER: string array containing the new header

 PROCEDURES USED: 
		ASTROLIB:
			fxhmake
			fxaddpar

 MODIFICATION HISTORY:
       Written by: I. Heinrichsen			Jan. 1997

(See write_fxisoheader.pro)