Пример #1
0
 def construct(self):
     self.om=observationmode.ObservationMode(self.omstring)
     self.rnames=[x for x in self.om._throughput_filenames if (x != 'clear')]
     try:
         self.idx=self.rnames.index(self.reffile)
     except ValueError:
         print("looking for ",self.reffile)
         for fname in self.rnames:
             print(fname)
Пример #2
0
    def test_two(self):
        throughput_list = ['comp/ota/hst_ota_007_syn.fits',
                           'comp/acs/acs_hrc_m12_005_syn.fits',
                           'comp/acs/acs_hrc_m3_005_syn.fits',
                           'comp/acs/acs_f435w_004_syn.fits',
                           'comp/acs/acs_hrc_win_005_syn.fits',
                           'comp/acs/acs_hrc_ccd_011_syn.fits']

        for i, f in enumerate(throughput_list):
            throughput_list[i] = os.path.join(self.cdbs, f)

        cmptb_name = os.path.join('mtab', 'r1j2146sm_tmc.fits')
        refs.COMPTABLE = locations._refTable(cmptb_name)

        obs = observationmode.ObservationMode('acs,hrc,f435w')

        n = self.check_list(throughput_list,
                            [c.throughput_name for c in obs.components])

        if n:
            raise AssertionError(n)
Пример #3
0
 def setUp(self):
     self.omstring = 'acs,hrc,fr459m#4610,aper#0.3'
     self.pardict = {'fr459m': 4610,'aper': 0.3}
     self.om = observationmode.ObservationMode(self.omstring)
Пример #4
0
 def test1(self):
     obsmode = observationmode.ObservationMode(values['obsmode'])
     self.assertApproxFP(obsmode.primary_area, values['hstarea'], accuracy=0.0025)
     throughput = obsmode.Throughput()._throughputtable
     self.assertEqual(len(throughput), 11003)
     self.assertApproxFP(throughput[5000], 0.12232652011958853, accuracy=0.0025)