def __init__(self, raw_data_file=None, analyzed_data_file=None, create_pdf=True, scan_parameter_name=None):
self.interpreter = PyDataInterpreter()<EOL>self.histogram = PyDataHistograming()<EOL>raw_data_files = []<EOL>if isinstance(raw_data_file, str):<EOL><INDENT>raw_data_file = os.path.abspath(raw_data_file)<EOL>f_list = analysis_utils.get_data_file_names_from_scan_base(raw_data_file, sort_by_time=True, meta_data_v2=self.interpreter.meta_table_v2)<EOL>if f_list:<EOL><INDENT>raw_data_files = f_list<EOL><DEDENT>else:<EOL><INDENT>if os.path.splitext(raw_data_file)[<NUM_LIT:1>].lower() != "<STR_LIT>":<EOL><INDENT>raw_data_files.append(os.path.splitext(raw_data_file)[<NUM_LIT:0>] + "<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>raw_data_files.append(raw_data_file)<EOL><DEDENT><DEDENT><DEDENT>elif isinstance(raw_data_file, (list, tuple, set)):  <EOL><INDENT>for one_raw_data_file in raw_data_file:<EOL><INDENT>one_raw_data_file = os.path.abspath(one_raw_data_file)<EOL>if os.path.splitext(one_raw_data_file)[<NUM_LIT:1>].lower() != "<STR_LIT>":<EOL><INDENT>raw_data_files.append(os.path.splitext(one_raw_data_file)[<NUM_LIT:0>] + "<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>raw_data_files.append(one_raw_data_file)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raw_data_files = None<EOL><DEDENT>if analyzed_data_file is not None:<EOL><INDENT>analyzed_data_file = os.path.abspath(analyzed_data_file)<EOL>if os.path.splitext(analyzed_data_file)[<NUM_LIT:1>].lower() != "<STR_LIT>":<EOL><INDENT>self._analyzed_data_file = os.path.splitext(analyzed_data_file)[<NUM_LIT:0>] + "<STR_LIT>"<EOL><DEDENT>else:  <EOL><INDENT>self._analyzed_data_file = analyzed_data_file<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if raw_data_file is not None:<EOL><INDENT>if isinstance(raw_data_file, str):<EOL><INDENT>self._analyzed_data_file = os.path.splitext(raw_data_file)[<NUM_LIT:0>] + '<STR_LIT>'<EOL><DEDENT>else:  <EOL><INDENT>commonprefix = os.path.commonprefix(raw_data_files)<EOL>if commonprefix:<EOL><INDENT>one_raw_data_file = os.path.abspath(commonprefix)<EOL><DEDENT>else:<EOL><INDENT>one_raw_data_file = os.path.abspath(raw_data_files[<NUM_LIT:0>])<EOL><DEDENT>self._analyzed_data_file = os.path.splitext(one_raw_data_file)[<NUM_LIT:0>] + '<STR_LIT>'<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._analyzed_data_file = None<EOL><DEDENT><DEDENT>if raw_data_files is not None:<EOL><INDENT>self.files_dict = analysis_utils.get_parameter_from_files(raw_data_files, parameters=scan_parameter_name)<EOL>if not analysis_utils.check_parameter_similarity(self.files_dict):<EOL><INDENT>raise analysis_utils.NotSupportedError('<STR_LIT>')<EOL><DEDENT>self.scan_parameters = analysis_utils.create_parameter_table(self.files_dict)<EOL>scan_parameter_names = analysis_utils.get_scan_parameter_names(self.scan_parameters)<EOL>logging.info('<STR_LIT>', ('<STR_LIT:U+002CU+0020>').join(scan_parameter_names) if scan_parameter_names else '<STR_LIT:None>',)<EOL><DEDENT>else:<EOL><INDENT>self.files_dict = None<EOL>self.scan_parameters = None<EOL><DEDENT>self.out_file_h5 = None<EOL>self.set_standard_settings()<EOL>if self._analyzed_data_file is not None:<EOL><INDENT>if raw_data_file is None:<EOL><INDENT>self.out_file_h5 = tb.open_file(self._analyzed_data_file, mode="<STR_LIT:a>", title="<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>self.out_file_h5 = tb.open_file(self._analyzed_data_file, mode="<STR_LIT:w>", title="<STR_LIT>")<EOL><DEDENT><DEDENT>if raw_data_file is not None and create_pdf:<EOL><INDENT>if isinstance(raw_data_file, str):<EOL><INDENT>output_pdf_filename = os.path.splitext(raw_data_file)[<NUM_LIT:0>] + "<STR_LIT>"<EOL><DEDENT>else:  <EOL><INDENT>one_raw_data_file = os.path.abspath(raw_data_files[<NUM_LIT:0>])<EOL>output_pdf_filename = os.path.splitext(one_raw_data_file)[<NUM_LIT:0>] + "<STR_LIT>"<EOL><DEDENT>logging.info('<STR_LIT>', output_pdf_filename)<EOL>self.output_pdf = PdfPages(output_pdf_filename)<EOL><DEDENT>else:<EOL><INDENT>self.output_pdf = None<EOL><DEDENT>self._scan_parameter_name = scan_parameter_name<EOL>self._settings_from_file_set = False<EOL>
Initialize the AnalyzeRawData object:
            - The c++ objects (Interpreter, Histogrammer, Clusterizer) are constructed
            - Create one scan parameter table from all provided raw data files
            - Create PdfPages object if needed

        Parameters
        ----------
        raw_data_file : string or list, tuple, set of strings
            Filename or a list of filenames of the raw data file(s) and analyzed_data_file will be overwritten.
            If None and if analyzed_data_file is not None, any existing analyzed_data_file will be opened, otherwise created.
            Filename extension (.h5) does not need to be provided.
        analyzed_data_file : string
            The file name of the output analyzed data file.
            If None and if raw_data_file is not None, the filename will be generated from the raw_data_file.
            Filename extension (.h5) does not need to be provided.
        create_pdf : boolean
            If True, plots will be written into a PDF file. Will be set to False, if raw_data_file is None.
        scan_parameter_name : string or iterable
            The name/names of scan parameter(s) to be used during analysis. If None, the scan parameter
            table is used to extract the scan parameters. Otherwise no scan parameter is set.