コード例 #1
0
    def check_positions(self, positions):

        if self.positions_threshold is not None and positions is None:
            raise exc.PhaseException(
                "You have specified for a phase to use positions, but not input positions to the "
                "pipeline when you ran it."
            )
コード例 #2
0
    def run(self, data, mask=None, positions=None, data_name=None):

        if self.hyper_mode and mask is None:
            raise exc.PhaseException(
                "The pipeline is running in hyper_galaxies mode, but has not received an input mask. Add"
                "a mask to the run function of the pipeline (e.g. pipeline.run(data_type=data_type, mask=mask)"
            )

        def runner(phase, results):
            return phase.run(data=data, results=results, mask=mask, positions=positions)

        return self.run_function(runner, data_name)