/***************************************************************** docbegin: * Name of file: jmx_lib_pif_subroutine.h * Version of source file: 6.0.0 * Parent component: * Programmer: Niels Lund * Affiliation: Danish National Space Center * Contact address: Juliane Maries Vej 30 * DK-2100 Copenhagen, Denmark * Phone: +45 35325716 FAX: +45 35362475 * nl@dnsc.dk * Purpose: Header file for 'j_lib_pif' * Origin date: 051124 * Update history: 1.0.0 First version * 1.5.4 060104 Bug in sh_depth corrected, detectmap now in mm * 1.5.5 060726 Moved declaration of MaskSS structure to alignment_init * Placed pointer to 'struct MaskSS' in struct 'instr_data'. * Eliminated 'struct MaskSS *mss' as parameter in 'struchk'. * 2.0.0 070302 Simplified peak optimization involving 'radcor' routine * 2.1.0 070730 Active use of input source catalog * and feedback from sky_image analysis * 2.1.0 070809 SCREWs 2021-2023 * 2.1.1 070918 SPR 4729: Floating Point Exception * 2.1.2 070920 SPR 4731: Missing inialization fixed * 2.1.3 070920 SPR 4734: Another issing inialization fixed * 2.1.4 070921 SPR 4736: Fixing use of isnan function * 2.1.5 070925 SPR 4737: Bad array dimensioning fixed * 5.1.2 151106 Running version with LC generation * 6.0.0 180112 Introduces LC generation and burst detection * Type of element: Headerfile * Part of package: jmx_lib_pif docend: *****************************************************************/ #ifndef JMX_LIB_PIF_SUB_INCLUDED #define JMX_LIB_PIF_SUB_INCLUDED /* ********************************************************* */ int update_imod_data( int jemx, /* 0 or 1 */ struct instr_data *jmx_id, struct log_con *logger, /* log control parameters */ int chatter, int status); int detectmap2( float x_source, float y_source, int srcfun[detdim], int last, int jemx, struct instr_data *jmx_id, struct log_con *logger ); int hexpos( double xmask, double ymask, int nnn[4], double hexa_dim ); /* ********************************************************* */ void struktu( struct log_con *logger, struct MaskSS *mss ); void bar( double endx[2], double endy[2], double w, int mark, struct log_con *logger, struct MaskSS *mss ); void ring( double ri, double ro, int mark, struct log_con *logger, struct MaskSS *mss ); void bolt( double xc, double yc, double r, int mark, int prin, struct log_con *logger, struct MaskSS *mss ); int circle( double xc, double yc, double r, double x, double y, double *rv, struct log_con *logger, struct MaskSS *mss ); void strukdef( struct log_con *logger, struct MaskSS *mss ); void s_turn( double xin, double yin, double angle, double *xout, double *yout, int prin, struct log_con *logger, struct MaskSS *mss ); void strucprint( double offx, double offy, struct log_con *logger, struct MaskSS *mss ); void strucpr2( int step, int off, struct log_con *logger, struct MaskSS *mss ); int strukupdate( double xv, double yv, double rv, struct log_con *logger, struct MaskSS *mss ); int struchk( double xm, double ym, double x_det, double y_det, int last, struct instr_data *jmx_id, struct log_con *logger ); /* ********************************************************* */ int getRAdec( float x, float y, int jemx, float *s_RA, float *s_dec, swg_pointing *point, struct log_con *logger, struct instr_data *jmx_id ); int getxy( float s_RA, float s_dec, int jemx, float *x, float *y, struct instr_data *jmx_id, swg_pointing *point, struct log_con *logger); int j_iir_get_radec_init( dal_element *theSWG, /* pointer to SWG */ Instrument jemxNum, /* JEMX identifier */ swg_pointing *point, /* struct with pointing parameters */ float *p_RA, float *p_dec, float *p_posang, struct log_con *logger, struct instr_data *jmx_id, int chatter, /* Level of debugging output */ int status); int j_lpf_get_sc_hk( dal_element *theSWG, /* pointer to SWG */ struct instr_data *jmx_id, int chatter, /* Level of debugging output */ int status); int j_lpf_get_spag_mod( Instrument jemxNum, dal_element *ptrIMOD, struct instr_data *jmx_id, int chatter, int status); int JEMXLIBgetIrosImodData( char *instMod, /* DOL of IMOD group */ dal_element *ptr_instMod, /* Pointer to IMOD group */ Instrument jemxNum, /* JMX1 or JMX2 */ struct instr_data *jmx_id, struct log_con *logger, /* log control parameters */ int chatter, int status); int JEMXLIBgetInstrData( char *instMod, /* DOL of IMOD group */ dal_element *ptr_instMod, /* Pointer to IMOD group */ Instrument jemxNum, /* JMX1 or JMX2 */ struct instr_data *jmx_id, struct log_con *logger, /* log control parameters */ int chatter, int status); int JEMXLIBgetStatusMap( dal_element *instModGrp, Instrument jemxInstr, struct instr_data *jmx_id, struct log_con *logger, /* log control parameters */ int chatter, int callingStatus); int saveparam2(FILE *sd, int ee, struct instr_data *jmx_id, struct log_con *logger); /* ********************************************************* */ int sh_xy( double x_rms, double y_rms, struct log_con *logger, struct instr_data *jmx_id); int sh_depth( float maskXmm, float maskYmm, float track_list[], int track_delta[], struct instr_data *jmx_id, /* i */ struct log_con *logger); int shapefold( int det[], float comb_list[], int comb_delta[], int comb_len, float det_out[], int last, struct log_con *logger); int shapecomb( float track_list[], int track_delta[], int track_len, float comb_list[], int comb_delta[], struct log_con *logger, struct instr_data *jmx_id); int sign( int x, struct log_con *logger); int j_lpf_lilipol( long n, float *xv, float *yv, float x, float *plili, int status); void transpose_usi( unsigned short int *array, int dim ); int normalize(double M[3]); /* declaration of local unit vector normalizing function */ /* Pre-080731 version [NJW] * int get_EEFF_array(struct backpro *backproj, struct instr_data *jmx_id, struct log_con *logger); * void get_CURTAIN_array(int jemx, struct instr_data *jmx_id, struct log_con *logger); */ int j_lpf_get_EEFF_CFTM_CURT( Instrument jemxNum, dal_element *ptrIMOD, struct instr_data *jmx_id, int chatter, int status); int j_lpf_get_jemx_hk( dal_element *theSWG, /* pointer to SWG */ Instrument jemxNum, /* JMX1 or JMX2 */ struct instr_data *jmx_id, struct log_con *logger, int chatter, /* Level of debugging output */ int status); int coll_transmit(float xmm, float ymm, struct instr_data *jmx_id, struct log_con *logger, float transmit[]); int off_axis_transmission( float xmm, float ymm, float Emin, float Emax, float *transmis, struct instr_data *jmx_id, struct log_con *logger); /* log control parameters */ /* * Replaced by j_lpf_get_XYvsE 2008-07-31/NJW * * void get_XYvsE( * int jemx, * struct instr_data *jmx_id); */ int j_lpf_get_XYvsE( Instrument jemxNum, dal_element *imodPtr, struct instr_data *jmx_id, int chatter, int status ); int get_effic( float slow, struct instr_data *jmx_id, float effic[2], int status); int electronic_eff( int shdg_num, int orbitnum, struct shadowgrams *sh, /* All shadowgram information */ userbin *USERBIN, /* shadowgram structure */ struct instr_data *jmx_id, struct log_con *logger); /* log control parameters */ int electronic_effLC( int eeuser, timeslices *Tslice, struct instr_data *jmx_id, userbin *USERBIN, /* shadowgram structure */ struct log_con *logger); /* log control parameters */ int time_slope( float Emin, float Emax, float time_slope_val, struct instr_data *jmx_id, struct log_con *logger); void fine_anoder(short AA[256]); int j_pif_limits2( int fitsrc_id, int source_id, struct backpro *backproj, struct log_con *logger, /* log control parameters */ int status ); /* ********************************************************* */ #endif