예제 #1
0
파일: convert.py 프로젝트: apertif/apercal
    def reset_all(self):
        """
        Function to reset the current step and remove all generated data for all beams. Be careful! Deletes all data generated in
        this step!
        """
        subs_setinit.setinitdirs(self)

        for b in range(self.NBEAMS):
            cbeam = 'convert_B' + str(b).zfill(2)

            logger.warning('Beam ' + str(b).zfill(2) +
                           ': Deleting all converted data.')
            path = self.get_crosscalsubdir_path(str(b).zfill(2))
            if os.path.isdir(path):
                subs_managefiles.director(self, 'rm', path + '/*')
            logger.warning(
                'Beam ' + str(b).zfill(2) +
                ': Deleting all parameter file entries for CONVERT module')
            subs_param.del_param(self, cbeam + '_fluxcal_MSavailable')
            subs_param.del_param(self, cbeam + '_polcal_MSavailable')
            subs_param.del_param(self, cbeam + '_targetbeams_MSavailable')
            subs_param.del_param(self, cbeam + '_fluxcal_MS2UVFITS')
            subs_param.del_param(self, cbeam + '_polcal_MS2UVFITS')
            subs_param.del_param(self, cbeam + '_targetbeams_MS2UVFITS')
            subs_param.del_param(self, cbeam + '_fluxcal_UVFITSavailable')
            subs_param.del_param(self, cbeam + '_polcal_UVFITSavailable')
            subs_param.del_param(self, cbeam + '_targetbeams_UVFITSavailable')
            subs_param.del_param(self, cbeam + '_fluxcal_UVFITS2MIRIAD')
            subs_param.del_param(self, cbeam + '_polcal_UVFITS2MIRIAD')
            subs_param.del_param(self, cbeam + '_targetbeams_UVFITS2MIRIAD')
예제 #2
0
 def reset(self):
     """
     Function to reset the current step and remove all generated data. Be careful! Deletes all data generated in this step!
     """
     subs_setinit.setinitdirs(self)
     logger.warning('Deleting all raw data products and their directories.')
     subs_managefiles.director(self, 'ch', self.basedir)
     deldirs = glob.glob(self.basedir + '[0-9][0-9]' + '/' + self.rawsubdir)
     for dir_ in deldirs:
         subs_managefiles.director(self, 'rm', dir_)
     logger.warning(
         'Deleting all parameter file entries for PREPARE module')
     subs_param.del_param(self, 'prepare_fluxcal_requested')
     subs_param.del_param(self, 'prepare_fluxcal_diskstatus')
     subs_param.del_param(self, 'prepare_fluxcal_altastatus')
     subs_param.del_param(self, 'prepare_fluxcal_copystatus')
     subs_param.del_param(self, 'prepare_fluxcal_rejreason')
     subs_param.del_param(self, 'prepare_polcal_requested')
     subs_param.del_param(self, 'prepare_polcal_diskstatus')
     subs_param.del_param(self, 'prepare_polcal_altastatus')
     subs_param.del_param(self, 'prepare_polcal_copystatus')
     subs_param.del_param(self, 'prepare_polcal_rejreason')
     subs_param.del_param(self, 'prepare_targetbeams_requested')
     subs_param.del_param(self, 'prepare_targetbeams_diskstatus')
     subs_param.del_param(self, 'prepare_targetbeams_altastatus')
     subs_param.del_param(self, 'prepare_targetbeams_copystatus')
     subs_param.del_param(self, 'prepare_targetbeams_rejreason')
예제 #3
0
    def reset_all(self):
        """
        Function to reset the current step and remove all generated data. Be careful! Deletes all data generated in
        this step!
        """
        subs_setinit.setinitdirs(self)
        logger.warning(
            'Deleting all raw data products and their directories for all beams. You will need to '
            'start with the PREPARE step again!')
        subs_managefiles.director(self, 'ch', self.basedir)
        for b in range(self.NBEAMS):

            prebeam = 'prepare_B' + str(b).zfill(2)
            sbeam = 'split_B' + str(b).zfill(2)

            if os.path.isdir(self.basedir + str(b).zfill(2) + '/' +
                             self.rawsubdir):
                try:
                    logger.warning('Beam ' + str(b).zfill(2) +
                                   ': Deleting all raw data products.')
                    subs_managefiles.director(
                        self, 'rm',
                        self.basedir + str(b).zfill(2) + '/' + self.rawsubdir)
                except:
                    pass
                logger.warning(
                    'Beam ' + str(b).zfill(2) +
                    ': Deleting all parameter file entries for PREPARE and SPLIT module.'
                )

                subs_param.del_param(self, prebeam + '_fluxcal_requested')
                subs_param.del_param(self, prebeam + '_fluxcal_diskstatus')
                subs_param.del_param(self, prebeam + '_fluxcal_altastatus')
                subs_param.del_param(self, prebeam + '_fluxcal_copystatus')
                subs_param.del_param(self, prebeam + '_fluxcal_rejreason')
                subs_param.del_param(self, prebeam + '_polcal_requested')
                subs_param.del_param(self, prebeam + '_polcal_diskstatus')
                subs_param.del_param(self, prebeam + '_polcal_altastatus')
                subs_param.del_param(self, prebeam + '_polcal_copystatus')
                subs_param.del_param(self, prebeam + '_polcal_rejreason')
                subs_param.del_param(self, prebeam + '_targetbeams_requested')
                subs_param.del_param(self, prebeam + '_targetbeams_diskstatus')
                subs_param.del_param(self, prebeam + '_targetbeams_altastatus')
                subs_param.del_param(self, prebeam + '_targetbeams_copystatus')
                subs_param.del_param(self, prebeam + '_targetbeams_rejreason')

                subs_param.del_param(self, sbeam + '_fluxcal_status')
                subs_param.del_param(self, sbeam + '_polcal_status')
                subs_param.del_param(self, sbeam + '_targetbeams_status')
            else:
                logger.warning('Beam ' + str(b).zfill(2) +
                               ': No raw data present.')
예제 #4
0
    def reset(self):
        """
        Function to reset the current step and remove all generated data. Be careful! Deletes all data generated in
        this step!
        """
        subs_setinit.setinitdirs(self)

        logger.warning('Beam ' + self.beam +
                       ': Deleting all raw data and their directories.')
        subs_managefiles.director(self, 'ch', self.basedir)
        try:
            subs_managefiles.director(
                self, 'rm', self.basedir + self.beam + '/' + self.rawsubdir)
        except:
            pass
        logger.warning(
            'Beam ' + self.beam +
            ': Deleting all parameter file entries for SPLIT and PREPARE module'
        )

        prebeam = 'prepare_B' + str(self.beam).zfill(2)
        sbeam = 'split_B' + str(self.beam).zfill(2)

        subs_param.del_param(self, prebeam + '_fluxcal_requested')
        subs_param.del_param(self, prebeam + '_fluxcal_diskstatus')
        subs_param.del_param(self, prebeam + '_fluxcal_altastatus')
        subs_param.del_param(self, prebeam + '_fluxcal_copystatus')
        subs_param.del_param(self, prebeam + '_fluxcal_rejreason')
        subs_param.del_param(self, prebeam + '_polcal_requested')
        subs_param.del_param(self, prebeam + '_polcal_diskstatus')
        subs_param.del_param(self, prebeam + '_polcal_altastatus')
        subs_param.del_param(self, prebeam + '_polcal_copystatus')
        subs_param.del_param(self, prebeam + '_polcal_rejreason')
        subs_param.del_param(self, prebeam + '_targetbeams_requested')
        subs_param.del_param(self, prebeam + '_targetbeams_diskstatus')
        subs_param.del_param(self, prebeam + '_targetbeams_altastatus')
        subs_param.del_param(self, prebeam + '_targetbeams_copystatus')
        subs_param.del_param(self, prebeam + '_targetbeams_rejreason')

        subs_param.del_param(self, sbeam + '_fluxcal_status')
        subs_param.del_param(self, sbeam + '_polcal_status')
        subs_param.del_param(self, sbeam + '_targetbeams_status')
예제 #5
0
    def reset(self):
        """
        Function to reset the current step and remove all generated data. Be careful! Deletes all data generated in
        this step!
        """
        subs_setinit.setinitdirs(self)
        nbeams = 37

        logger.warning(' Deleting all converted data.')
        for beam in range(nbeams):
            path = self.get_crosscalsubdir_path(str(beam).zfill(2))
            if path.isdir(path):
                subs_managefiles.director(self, 'rm', path + '/*')
        logger.warning(
            ' Deleting all parameter file entries for CONVERT module')
        subs_param.del_param(self, 'convert_fluxcal_MSavailable')
        subs_param.del_param(self, 'convert_polcal_MSavailable')
        subs_param.del_param(self, 'convert_targetbeams_MSavailable')
        subs_param.del_param(self, 'convert_fluxcal_MS2UVFITS')
        subs_param.del_param(self, 'convert_polcal_MS2UVFITS')
        subs_param.del_param(self, 'convert_targetbeams_MS2UVFITS')
        subs_param.del_param(self, 'convert_fluxcal_UVFITSavailable')
        subs_param.del_param(self, 'convert_polcal_UVFITSavailable')
        subs_param.del_param(self, 'convert_targetbeams_UVFITSavailable')
        subs_param.del_param(self, 'convert_fluxcal_UVFITS2MIRIAD')
        subs_param.del_param(self, 'convert_polcal_UVFITS2MIRIAD')
        subs_param.del_param(self, 'convert_targetbeams_UVFITS2MIRIAD')
예제 #6
0
파일: mosaic.py 프로젝트: rs1701/apercal
 def reset(self):
     """
     Function to reset the current step and remove all generated data. Be careful! Deletes all data generated in
     this step!
     """
     subs_setinit.setinitdirs(self)
     subs_setinit.setdatasetnamestomiriad(self)
     if os.path.isdir(self.mosdir):
         logger.warning('Deleting all mosaicked data products.')
         subs_managefiles.director(self, 'ch', self.basedir)
         subs_managefiles.director(self, 'rm', self.mosdir)
         logger.warning(
             'Deleting all parameter file entries for MOSAIC module')
         subs_param.del_param(self, 'mosaic_continuum_mf_status')
         subs_param.del_param(self, 'mosaic_continuum_mf_continuumstatus')
         subs_param.del_param(self, 'mosaic_continuum_mf_copystatus')
         subs_param.del_param(self, 'mosaic_continuum_mf_convolstatus')
         subs_param.del_param(self,
                              'mosaic_continuum_mf_continuumbeamparams')
         subs_param.del_param(self,
                              'mosaic_continuum_mf_continuumimagestats')
     else:
         logger.warning('Mosaicked data products are not present!')