In [1]:
import holoviews as hv
hv.notebook_extension('bokeh')
In [2]:
from lsst.daf.persistence import Butler
repo_path = '/datasets/hsc/repo/rerun/RC/w_2018_04/DM-13256/'
butler = Butler(repo_path)
In [3]:
from explorer.catalog import CoaddCatalog, VisitCatalog, MultiMatchedCatalog
from explorer.utils import get_visits
tract = 9615
filt = 'HSC-I'
dataId = {'tract':tract, 'filter':filt}
catalog = CoaddCatalog(butler, dataId)
# visit_catalogs = [VisitCatalog(butler, {'tract': tract, 'filter':filt, 'visit':v}, name=v) for v in get_visits(butler, tract, filt)]
# matched_catalog = MultiMatchedCatalog(catalog, visit_catalogs, match_registry='t9615_demo.h5')
In [4]:
from explorer.functors import MagDiff, Seeing, DeconvolvedMoments, Column
magdiff = MagDiff('modelfit_CModel', 'base_PsfFlux')
magdiff_gauss = MagDiff('base_GaussianFlux', 'base_PsfFlux')
funcs = {'cmodel':magdiff, 'gauss':magdiff_gauss, 'count': Column('base_InputCount_value'), 'seeing':Seeing()}
matched_funcs = {'guass':magdiff_gauss, 'seeing':Seeing()}
In [5]:
from explorer.dataset import QADataset
flags = ['calib_psfUsed', 'qaBad_flag',
'merge_measurement_i',
'merge_measurement_r',
'merge_measurement_z',
'merge_measurement_y',
'merge_measurement_g',
'base_Footprint_nPix_flag',
'base_PixelFlags_flag_inexact_psfCenter']
data = QADataset(catalog, funcs, flags=flags)
# matched_data = QADataset(matched_catalog, matched_funcs, flags=flags) #memory issues for demo
In [6]:
# Calculate dataframe; see how long it takes.
%time data.df.head()
Out[6]:
In [7]:
from explorer.plots import FilterStream, multi_scattersky
filter_stream = FilterStream()
multi_scattersky(data.ds, filter_stream=filter_stream, width=900, height=300)
Out[7]: