Ejemplo n.º 1
0
            primhdu_ = plate_[0]
            PLATEIDs.append(primhdu_.header['PLATEID'])
            ORMASK.append(plate_[3].data)
            ANDMASK.append(plate_[2].data)
            INVAR.append(plate_[1].data)
            log_wavst.append(primhdu_.header['COEFF0'])
            MJDs.append(primhdu_.header['MJD'])
            BinInfos.append(Bin_info_)
            Flux.append(Flux_)

list = fits.open('Superset_DR12Q.fits', memmap=True)  #opening file
supers = list[1].data  # storing  BINTABLE extension data
print("Restoring Data")
Full_Data = storing(PLATEIDs, supers)
X, Y, Train_z, Train_mag, And, In, wavst, ID = MLAData(Full_Data, BinInfos,
                                                       Flux, log_wavst,
                                                       ANDMASK, INVAR)

i = 0
print("Saving Files")
while i < len(PLATEIDs):
    C_Plate = PLATEIDs[i]
    a1 = X[i]
    a2 = np.array(Y[i])
    if len(a1) == 0 & len(a2) == 0:
        i = i + 1
    else:
        a3 = And[i]
        a4 = In[i]
        a5 = Train_z[i]
        a6 = ID[i]
Ejemplo n.º 2
0
            Flux_ = plate_[0].data
            primhdu_ = plate_[0]
            PLATEIDs.append(primhdu_.header['PLATEID'])
            ORMASK.append(plate_[3].data)
            ANDMASK.append(plate_[2].data)
            INVAR.append(plate_[1].data)
            log_wavst.append(primhdu_.header['COEFF0'])
            MJDs.append(primhdu_.header['MJD'])
            BinInfos.append(Bin_info_)
            Flux.append(Flux_)

list = fits.open('Superset_DR12Q.fits', memmap=True)  #opening file
supers = list[1].data  # storing  BINTABLE extension data
print("Restoring Data")
Full_Data = storing(PLATEIDs, supers)
X, Y, Train_z, Train_mag, And, In, wavst, ID, MJ, MatchedPlates = MLAData(
    Full_Data, BinInfos, Flux, log_wavst, ANDMASK, INVAR, MJDs, PLATEIDs)

i = 0

i = 0
print("Counting")
RejNoPlate = []
while i < len(MatchedPlates):
    no = 0
    a7 = And[i]
    RejNo = 0
    while no < len(a7):
        obj_and = a7[no]
        pixel_count = 0
        RejNo = 0
        while pixel_count < len(obj_and):
Ejemplo n.º 3
0
            primhdu_ = plate_[0]
            PLATEIDs.append(primhdu_.header['PLATEID'])
            ORMASK.append(plate_[3].data)
            ANDMASK.append(plate_[2].data)
            INVAR.append(plate_[1].data)
            log_wavst.append(primhdu_.header['COEFF0'])
            MJDs.append(primhdu_.header['MJD'])
            BinInfos.append(Bin_info_)
            Flux.append(Flux_)

list = fits.open('Superset_DR12Q.fits', memmap=True)  #opening file
supers = list[1].data  # storing  BINTABLE extension data
print("Restoring Data")
Full_Data = storing(PLATEIDs, supers)
X, Y, Train_z, Train_mag, And, In, wavst, ID = MLAData(Full_Data, BinInfos,
                                                       Flux, log_wavst,
                                                       ANDMASK, INVAR)
wav_ratio = 10**0.0001
plate_no = 0
all_wav = []

while plate_no < len(wavst):
    append_count = 0
    cent_wav = 10**wavst[plate_no]
    wavelengths = []
    wavelengths.append(cent_wav)
    current_wav = cent_wav
    while append_count < (4600 - 1):
        current_wav = current_wav * wav_ratio
        wavelengths.append(current_wav)
        append_count = append_count + 1
Ejemplo n.º 4
0
            Flux_ = plate_[0].data
            primhdu_ = plate_[0]
            PLATEIDs.append(primhdu_.header['PLATEID'])
            ORMASK.append(plate_[3].data)
            ANDMASK.append(plate_[2].data)
            INVAR.append(plate_[1].data)
            log_wavst.append(primhdu_.header['COEFF0'])
            MJDs.append(primhdu_.header['MJD'])
            BinInfos.append(Bin_info_)
            Flux.append(Flux_)

list = fits.open('Superset_DR12Q.fits', memmap=True)  #opening file
supers = list[1].data  # storing  BINTABLE extension data
print("Restoring Data")
Full_Data = storing(PLATEIDs, supers)
X, Y, Train_z, Train_mag, And, In, wavst, ID, MJ, MatchedPlates = MLAData(
    Full_Data, BinInfos, Flux, log_wavst, ANDMASK, INVAR, MJDs, PLATEIDs)
plate_no = 0
all_Testwav = []
wav_ratio = 10**0.0001

while plate_no < len(X):
    append_count = 0
    cent_wav = 10**wavst[plate_no]
    wavelengths = []
    wavelengths.append(cent_wav)
    current_wav = cent_wav
    while append_count < (4600 - 1):
        current_wav = current_wav * wav_ratio
        wavelengths.append(current_wav)
        append_count = append_count + 1
    plate_no = plate_no + 1