Example #1
0
 def testNoOutputBands(self):
     """All the input bands should go into the output, and nothing else.
     """
     config = TransformObjectCatalogConfig()
     config.multilevelOutput = True
     task = TransformObjectCatalogTask(config=config)
     funcs = {'Fwhm': HsmFwhm(dataset='meas')}
     df = task.run(self.parq, funcs=funcs, dataId=self.dataId)
     self.assertIsInstance(df, pd.DataFrame)
     self.assertNotIn('HSC-G', df)
     for filt in ['g', 'r', 'i']:
         self.assertIsInstance(df[filt], pd.DataFrame)
         self.assertIn('Fwhm', df[filt].columns)
Example #2
0
 def testMultilevelOutput(self):
     """Test the non-flattened result dataframe with a multilevel column index"""
     config = TransformObjectCatalogConfig()
     config.outputBands = ["r", "i"]
     config.multilevelOutput = True
     task = TransformObjectCatalogTask(config=config)
     funcs = {'Fwhm': HsmFwhm(dataset='meas')}
     df = task.run(self.parq, funcs=funcs, dataId=self.dataId)
     self.assertIsInstance(df, pd.DataFrame)
     self.assertNotIn('g', df)
     for filt in config.outputBands:
         self.assertIsInstance(df[filt], pd.DataFrame)
         self.assertIn('Fwhm', df[filt].columns)