예제 #1
0
    def make_psana_cfg_file_for_data_aver_v1(self):
        self.path_in = apputils.AppDataPath(
            'CorAna/scripts/psana-data-aver.cfg').path()
        self.path_out = fnm.path_data_aver_psana_cfg()
        self.d_subs = {
            'FNAME_XTC': fnm.path_data_xtc_cond(),
            'SKIP': str(cp.bat_data_start.value() - 1),
            'EVENTS':
            str(cp.bat_data_end.value() - cp.bat_data_start.value() + 1),
            'IMG_REC_MODULE': str(cp.bat_img_rec_mod.value()),
            'DETINFO': str(cp.bat_det_info.value()),
            'FNAME_DATA_AVE': fnm.path_data_raw_ave(),
            'FNAME_DATA_RMS': fnm.path_data_raw_rms(),
            'SAT_THR_ADU': str(cp.ccdset_adcsatu.value()),
            'SATPIX_MASK': fnm.path_satpix_mask(),
            'SATPIX_FRAC': fnm.path_satpix_frac(),
            'HOTPIX_MASK': '',  # fnm.path_hotpix_mask(),
            'HOTPIX_FRAC': ''  # fnm.path_hotpix_frac()
        }
        # cp.ccdset_ccdgain.value()
        # cp.ccdset_ccdeff .value()

        #self.print_substitution_dict()
        #self.make_cfg_file()
        txt_cfg = self.text_for_section()
        self.save_cfg_file(txt_cfg, self.path_out)
예제 #2
0
    def add_cfg_module_img_mask_evaluation (self) :
        self.path_in  = apputils.AppDataPath('CorAna/scripts/psana-module-img-mask-evaluation.cfg').path()
        mod = 'ImgAlgos.ImgMaskEvaluation'
        self.d_subs   = {
                         'MODULE'         : mod, # str( cp.bat_img_rec_mod.value() )
                         'DETINFO'        : str( cp.bat_det_info.value() ),
                         'KEY_IN'         : 'img',
                         'SAT_THR_ADU'    : str( cp.ccdset_adcsatu.value() ),
                         'SATPIX_MASK'    : fnm.path_satpix_mask(),
                         'SATPIX_FRAC'    : fnm.path_satpix_frac(),
                         'HOTPIX_MASK'    : '', # fnm.path_hotpix_mask(),
                         'HOTPIX_FRAC'    : '' # fnm.path_hotpix_frac()
                         }

        self.add_module_in_cfg (mod)
예제 #3
0
    def add_cfg_module_img_mask_evaluation(self):
        self.path_in = apputils.AppDataPath(
            'CorAna/scripts/psana-module-img-mask-evaluation.cfg').path()
        mod = 'ImgAlgos.ImgMaskEvaluation'
        self.d_subs = {
            'MODULE': mod,  # str( cp.bat_img_rec_mod.value() )
            'DETINFO': str(cp.bat_det_info.value()),
            'KEY_IN': 'img',
            'SAT_THR_ADU': str(cp.ccdset_adcsatu.value()),
            'SATPIX_MASK': fnm.path_satpix_mask(),
            'SATPIX_FRAC': fnm.path_satpix_frac(),
            'HOTPIX_MASK': '',  # fnm.path_hotpix_mask(),
            'HOTPIX_FRAC': ''  # fnm.path_hotpix_frac()
        }

        self.add_module_in_cfg(mod)
예제 #4
0
    def make_psana_cfg_file_for_data_aver (self) :
        self.path_in  = apputils.AppDataPath('CorAna/scripts/psana-data-aver.cfg').path()
        self.path_out = fnm.path_data_aver_psana_cfg()
        self.d_subs   = {'FNAME_XTC'      : fnm.path_data_xtc_cond(),
                         'SKIP'           : str( cp.bat_data_start.value() - 1 ),
                         'EVENTS'         : str( cp.bat_data_end.value() - cp.bat_data_start.value() + 1 ),
                         'IMG_REC_MODULE' : str( cp.bat_img_rec_mod.value() ),
                         'DETINFO'        : str( cp.bat_det_info.value() ),
                         'FNAME_DATA_AVE' : fnm.path_data_ave(),
                         'FNAME_DATA_RMS' : fnm.path_data_rms(),
                         'SAT_THR_ADU'    : str( cp.ccdset_adcsatu.value() ),
                         'SATPIX_MASK'    : fnm.path_satpix_mask(),
                         'SATPIX_FRAC'    : fnm.path_satpix_frac(),
                         'HOTPIX_MASK'    : '', # fnm.path_hotpix_mask(),
                         'HOTPIX_FRAC'    : '' # fnm.path_hotpix_frac()
                         }
        # cp.ccdset_ccdgain.value()
        # cp.ccdset_ccdeff .value()

        self.print_substitution_dict()
        self.make_cfg_file()