Exemplo n.º 1
0
    def __init__(self, file_name):
        super(SANSFileInformationISISAdded, self).__init__(file_name)
        # Setup instrument name
        instrument_name = get_instrument_name_for_isis_nexus(
            self._full_file_name)
        self._instrument = get_instrument(instrument_name)

        # Setup the facility
        self._facility = get_facility(self._instrument)

        self._date, _ = self._get_date_and_run_number_added_nexus(
            self._full_file_name)

        _, number_of_periods, is_event = get_added_nexus_information(
            self._full_file_name)
        self._number_of_periods = number_of_periods
        self._is_event_mode = is_event

        # Get geometry details
        height, width, thickness, shape = get_geometry_information_isis_added_nexus(
            self._full_file_name)
        self._height = height if height is not None else 1.
        self._width = width if width is not None else 1.
        self._thickness = thickness if thickness is not None else 1.
        self._shape = shape if shape is not None else SampleShape.DISC
Exemplo n.º 2
0
    def __init__(self, file_name):
        super(SANSFileInformationISISAdded, self).__init__(file_name)
        # Setup instrument name
        instrument_name = get_instrument_name_for_isis_nexus(self._full_file_name)
        self._instrument = get_instrument(instrument_name)

        # Setup the facility
        self._facility = get_facility(self._instrument)

        date, run_number = get_date_and_run_number_added_nexus(self._full_file_name)
        self._date = date
        self._run_number = run_number

        _,  number_of_periods, is_event = get_added_nexus_information(self._full_file_name)
        self._number_of_periods = number_of_periods
        self._is_event_mode = is_event

        # Get geometry details
        height, width, thickness, shape = get_geometry_information_isis_added_nexus(self._full_file_name)
        self._height = height if height is not None else 1.
        self._width = width if width is not None else 1.
        self._thickness = thickness if thickness is not None else 1.
        self._shape = shape if shape is not None else SampleShape.Disc