Ejemplo n.º 1
0
def get_coverage_onedet(idetector=231, angspeed=1., delta_az=15., angspeed_psi=0., maxpsi=15., nsweeps_el=100, duration=24, ts=1., decrange=2., decspeed=2., recenter=False):
    print('##### Getting Coverage for: ') 
    print('## idetector = '+str(idetector))
    print('## duration = '+str(duration))
    print('## ts = '+str(ts))
    print('## recenter = '+str(recenter))
    print('## angspeed = '+str(angspeed))
    print('## delta_az = '+str(delta_az))
    print('## nsweeps_el = '+str(nsweeps_el))
    print('## decrange = '+str(decrange))
    print('## decspeed = '+str(decspeed))
    print('## angspeed_psi = '+str(angspeed_psi))
    print('## maxpsi = '+str(maxpsi))
    print('##########################')
    nside = 256
    racenter = 0.0
    deccenter = -57.0
    pointing = pointings_modbyJC.create_sweeping_pointings(
        [racenter, deccenter], duration, ts, angspeed, delta_az, nsweeps_el,
        angspeed_psi, maxpsi, decrange=decrange, decspeed=decspeed, recenter=recenter)
    pointing.angle_hwp = np.random.random_integers(0, 7, pointing.size) * 22.5
    ntimes = len(pointing)

    # get instrument model with only one detector
    instrument = QubicInstrument('monochromatic')
    mask_packed = np.ones(len(instrument.detector.packed), bool)
    mask_packed[idetector] = False
    mask_unpacked = instrument.unpack(mask_packed)
    instrument = QubicInstrument('monochromatic', removed=mask_unpacked)
    
    obs = QubicAcquisition(instrument, pointing)
    convolution = obs.get_convolution_peak_operator()
    projection = obs.get_projection_peak_operator(kmax=0)
    coverage = projection.pT1()
    return coverage
Ejemplo n.º 2
0

nside = 256
racenter = 0.0
deccenter = -57.0
angspeed = 0.3    # deg/sec
delta_az = 20.
angspeed_psi = 0
maxpsi = 15.
nsweeps_el = int(120*angspeed)
duration = 24   # hours
ts = 0.1         # seconds
decrange=0
decspeed=0
pointing = pointings_modbyJC.create_sweeping_pointings(
    [racenter, deccenter], duration, ts, angspeed, delta_az, nsweeps_el,
    angspeed_psi, maxpsi, decrange=decrange, decspeed=decspeed,recenter=True)
pointing.angle_hwp = np.random.random_integers(0, 7, pointing.size) * 22.5
ntimes = len(pointing)

# get instrument model with only one detector
idetector = 231
instrument = QubicInstrument('monochromatic')
instrument.plot()
mask_packed = np.ones(len(instrument.detector.packed), bool)
mask_packed[idetector] = False
mask_unpacked = instrument.unpack(mask_packed)
instrument = QubicInstrument('monochromatic', removed=mask_unpacked)

obs = QubicAcquisition(instrument, pointing)
convolution = obs.get_convolution_peak_operator()