Esempio n. 1
0
    def create(cls, params, experiment, reflection_table):
        """Return Null Scaler."""

        logger.info("Preprocessing target dataset for scaling. \n")
        reflection_table = cls.filter_bad_reflections(reflection_table)
        variance_mask = reflection_table["variance"] <= 0.0
        reflection_table.set_flags(variance_mask,
                                   reflection_table.flags.excluded_for_scaling)
        logger.info(
            "%s reflections not suitable for scaling\n",
            reflection_table.get_flags(
                reflection_table.flags.excluded_for_scaling).count(True),
        )
        cls.ensure_experiment_identifier(experiment, reflection_table)
        return NullScaler(params, experiment, reflection_table)
Esempio n. 2
0
def test_NullScaler():
    """Test for successful creation of NullScaler."""
    p, e, r = (generated_param(), generated_exp(), generated_refl())
    exp = create_scaling_model(p, e, r)
    _ = NullScaler(p, exp[0], r)