示例#1
0
    def flux_science(self, sci_file):
        """
        Flux the internal list of sci_specobjs

        Wrapper to flux.apply_sensfunc()

        Returns
        -------

        """
        # Load
        self.load_objs(sci_file, std=False)
        # Run
        norder = self.sens_dict['meta']['nslits']
        for iord in range(norder):
            sens_dict_iord = self.sens_dict[str(iord)]
            for sci_obj in self.sci_specobjs:
                if sci_obj.ech_orderindx == iord:
                    flux.apply_sensfunc(
                        sci_obj,
                        sens_dict_iord,
                        float(self.sci_header['AIRMASS']),
                        self.sci_header['EXPTIME'],
                        extinct_correct=self.par['extinct_correct'],
                        longitude=self.spectrograph.telescope['longitude'],
                        latitude=self.spectrograph.telescope['latitude'])

        self.steps.append(inspect.stack()[0][3])
    def flux_science(self):
        """
        Flux the internal list of sci_specobjs

        Wrapper to flux.apply_sensfunc()

        Returns
        -------

        """
        norder = self.sens_dict['norder']
        for iord in range(norder):
            sens_dict_iord = self.sens_dict[str(iord)]
            for sci_obj in self.sci_specobjs:
                if sci_obj.ech_orderindx == iord:
                    flux.apply_sensfunc(sci_obj, sens_dict_iord, self.sci_header['AIRMASS'],
                                        self.sci_header['EXPTIME'], self.spectrograph)
        self.steps.append(inspect.stack()[0][3])
def ech_flux_science(sci_specobjs, sens_dicts, sci_header, spectrograph=None):
    """
    Flux the internal list of sci_specobjs

    Wrapper to flux.apply_sensfunc()

    Returns
    -------

    """
    norder = sens_dicts['norder']
    if spectrograph is None:
        spectrograph = sci_header['INSTRUME']
        msgs.info('You are working on {:s}'.format(spectrograph))
    for iord in range(norder):
        sens_dict = sens_dicts[str(iord)]
        for sci_obj in sci_specobjs:
            if sci_obj.ech_orderindx == iord:
                flux.apply_sensfunc(sci_obj, sens_dict, sci_header['AIRMASS'],
                                    sci_header['EXPTIME'], spectrograph)
def ech_flux_science(sci_specobjs,sens_dicts,sci_header,spectrograph=None):
    """
    Flux the internal list of sci_specobjs

    Wrapper to flux.apply_sensfunc()

    Returns
    -------

    """
    norder = sens_dicts['norder']
    if spectrograph is None:
        spectrograph = sci_header['INSTRUME']
        msgs.info('You are working on {:s}'.format(spectrograph))
    for iord in range(norder):
        sens_dict = sens_dicts[str(iord)]
        for sci_obj in sci_specobjs:
            if sci_obj.ech_orderindx == iord:
                flux.apply_sensfunc(sci_obj, sens_dict, sci_header['AIRMASS'],
                                      sci_header['EXPTIME'], spectrograph)
示例#5
0
    def flux_science(self, sci_file):
        """
        Flux the internal list of sci_specobjs

        Wrapper to flux.apply_sensfunc()

        Returns
        -------

        """
        # Load
        self.load_objs(sci_file, std=False)
        # Run
        for sci_obj in self.sci_specobjs:
            flux.apply_sensfunc(
                sci_obj,
                self.sens_dict['0'],
                self.sci_header['AIRMASS'],
                self.sci_header['EXPTIME'],
                telluric_correct=self.par['telluric_correct'],
                extinct_correct=self.par['extinct_correct'],
                longitude=self.spectrograph.telescope['longitude'],
                latitude=self.spectrograph.telescope['latitude'])
        self.steps.append(inspect.stack()[0][3])