In [1]:
import numpy as np
from astropy.table import Table, join
from astropy import units as u
from astropy.coordinates import SkyCoord, search_around_sky
from IPython.display import clear_output
from mltier1 import Field, describe
In [2]:
combined = Table.read("pw_lrdata.fits")
In [3]:
combined.colnames
Out[3]:
In [4]:
combined[combined["AllWISE"] == "J144838.14+425031.4"]
Out[4]:
In [5]:
combined['ra'] = combined['raMean']
combined['dec'] = combined['decMean']
combined['raErr'] = combined['raMeanErr']
combined['decErr'] = combined['decMeanErr']
combined['ra'][np.isnan(combined['raMean'])] = combined['raWise'][np.isnan(combined['raMean'])]
combined['dec'][np.isnan(combined['decMean'])] = combined['decWise'][np.isnan(combined['decMean'])]
combined['raErr'][np.isnan(combined['raMean'])] = combined['raWiseErr'][np.isnan(combined['raMean'])]
combined['decErr'][np.isnan(combined['decMean'])] = combined['decWiseErr'][np.isnan(combined['decMean'])]
In [6]:
for col in ["raMean", "decMean", "raMeanErr", "decMeanErr",
"raWise", "decWise", "raWiseErr", "decWiseErr",
"ra", "dec", "raErr", "decErr"]:
combined[col].fill_value = 1e+20
In [7]:
combined[combined["AllWISE"] == "J144838.14+425031.4"]
Out[7]:
In [8]:
columns_save = ['AllWISE', 'objID', 'ra', 'dec', 'raErr', 'decErr',
'W1mag', 'W1magErr', 'i', 'iErr']
In [10]:
combined[columns_save].write('pw.fits', format="fits")
In [11]:
combined2 = Table.read("pw.fits")
In [12]:
combined2[combined2["AllWISE"] == "J144838.14+425031.4"]
Out[12]:
In [ ]: