PIA flag system

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:39 2000.


List of Routines


Routine Descriptions

DECODE_FLAG

[Next Routine] [List of Routines]
 NAME:
       DECODE_FLAG

 PURPOSE:
	Decode a flag, coded bitswise

 CATEGORY:
	PIA - processing

 CALLING SEQUENCE:
       decode_flag, flag, nflag, code 

 INPUT:
       flag	Coded flag array (1- or 2-dimensional)
	nflag	Number of elements coded 

 KEYWORDS:
	(none) 
	
 OUTPUTS:
	code	A (2- or 3-dim) array of [nflags,flag-dim] containing 0 or 1
		for the coded nflags 


 MODIFICATION HISTORY:
       Written by:	Jose Acosta (IDC/IAC)		March 1999
	V7.4

(See decode_flag.pro)


DECODE_PIAFLAG

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       decode_piaflag
 PURPOSE:
	Decode a PIA coded flag, returning a flag array corresponding to the
	given element in the given processing level (ERD, SRD, ...).
       It can be called with a bidimensional array.

 CATEGORY:
       PIA - flag system

 CALLING SEQUENCE:
       DECODE_PIAFLAG, dtype, lex_flag, codeflag, unitflag  $
                [,DET = det] [,/ALLPIX]

 INPUT PARAMETERS:
       codeflag: Flag using the coding of PIA (Normal case: tmpdata.flag)
       dtype:    Data type  [ERD,SRD,SCP,SPD,AAP]     
       lex_flag: Name of the flag to decode

 OUTPUT PARAMETERS: 
       unitflag: Flag array corresponding to lex_flag (0 or 1)

 PROCEDURES USED:
       Common Block(s) or @ procedure(s):
               piaflag_info

 MODIFICATION HISTORY:
       Written by: J.Acosta
       Feb 98 Version 7.x
	Updated by JA+CG 		May 99
	Adding initialization (CG)	May 99
	Simplified code (JA+CG)		June 99
	V7.4
	DYNR included (JA)		February 2000
	V8.2

(See decode_piaflag.pro)


ENCODE_PIAFLAG

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       encode_piaflag
 PURPOSE:
 	Encode a coded flag from a reduced flag, which depends on the data type,
	(ERD, SRD, ...). It can be called with a bidimensional array.

 CATEGORY:
       PIA - flag system

 CALLING SEQUENCE:
       ENCODE_PIAFLAG, dtype, lex_flag, codeflag, newflag, unitflag, [,/RESET] $
	         [,DET = det] [,/ALLPIX]

 INPUT PARAMETERS:
       unitflag: Flag from any processing system
	dtype:	  Data type  [ERD,SRD,SCP,SPD,AAP]     
	lex_flag: Name of the flag to encode
       codeflag: Previous absolute flag value 

 OUTPUT PARAMETERS: 
       newflag: New absolute Flag value 

 KEYWORD INPUT:
	RESET:	setting lex_flag to 0 in newflag (unitflag irrelevant)
	DET:	detector used
	ALLPIX:	update also flags corresponding to open+resistor pixels

 PROCEDURES USED:
       Common Block(s) or @ procedure(s):
               piaflag_info

 MODIFICATION HISTORY:
       Written by: J.Acosta
       Feb 98 Version 7.x
	Update by CG+JA 			May 1999
	Logic changed (CG)			June 1999
	V7.4
	DYNR included (JA)		February 2000
	V8.2

(See encode_piaflag.pro)


GET_VALIDFLAG

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       get_validflag
 PURPOSE:
 	Get a reduced flag from a coded flag, which depends on the data type,
	(ERD, SRD, ...). It can be called with a bidimensional array.

 CATEGORY:
       PIA - flag

 CALLING SEQUENCE:
       GET_VALIDFLAG, codeflag, dtype, redflag [,INDSEVERE=indsevere], $
	         [,DET = det] [,/ALLPIX]

 INPUT PARAMETERS:
       codeflag: Flag using the coding of PIA
	dtype:	  Data type  [ERD,SRD,SCP,SPD,AAP]     

 OUTPUT PARAMETERS: 
       redflag: flag set to 1 when a point is discarded and 0 otherwise.

 PROCEDURES USED:
       Common Block(s) or @ procedure(s):
               piaflag_info

 KEYWORDS: 
       DET: detector
	ALLPIX: set for all pixels, including resistor and open pixels
	INDSEVERE: index of flags which are to be rejected

 MODIFICATION HISTORY:
       Written by: J.Acosta
       Feb 98 Version 7.x
	Updated by JA + CG - May 99
	Using boolean algebra (CG) - Jul 99
	V8.0

(See get_validflag.pro)


PIAFLAG_INFO

[Previous Routine] [Next Routine] [List of Routines]
 NAME:
       piaflag_info
 PURPOSE:
       Initializes the common block PIAFLAG_INFO which contains the information
       for the different flag coding used in PIA at different processing levels.

 CATEGORY:
       PIA - initialization

 CALLING SEQUENCE:
       PIAFLAG_INFO

 INPUT PARAMETERS:
       None       

 OUTPUT PARAMETERS: 
       None

 PROCEDURES USED:
       Common Block(s) or @ procedure(s):
               piaflag_info

 MODIFICATION HISTORY:
       Written by: J.Acosta
       Feb 97 Version 7.x
	Update (JA+CG) May 99
	IMAP flag included in SPD level (CG) Mar 99

(See piaflag_info.pro)


SET_INDSEVERE

[Previous Routine] [List of Routines]
 NAME:
       set_indsevere
 PURPOSE:

 CATEGORY:
       PIA - flag

 CALLING SEQUENCE:
	res = SET_INDSEVERE(datatype, ind_lexical [,/REPLACE] [,/UPDATE] $
                           [,/DELETE])

 INPUT PARAMETERS:
       datatype:    Data type  [ERD,SRD,SCP,SPD,AAP]     
	ind_lexical: Array with the lexicals containing severe flags

 OUTPUT PARAMETERS: 
       res: index of flags which are considered severe
	ind_lexical: If keywords REPLACE or UPDATE are absent it contains  
	 		the lexical of the default severe flag .

 KEYWORDS: 
	REPLACE: will 

 PROCEDURES USED:
       Common Block(s) or @ procedure(s):
               piaflag_info

 MODIFICATION HISTORY:
	Written by: Jose Acosta (ISO Soc, VILSPA)		March 1998
	V7.2				
	Updated by JA+CG in La Laguna 				May 1999
	V7.4

(See set_indsevere.pro)