def prepareParameters(self):
        """
        method prepares poincare plot parameters
        """
        if self.stepper:
            self.stepper_size = extract_number(self.stepper, convert=int)
            self.stepper_unit = extract_alphabetic(self.stepper,
                                                   convert=str.lower)
        self.movie_dir = nvl(self.movie_dir, self.output_dir, '')

        if isinstance(self.excluded_annotations, str):
            self.excluded_annotations = get_as_list(self.excluded_annotations)

        if self.filters_names is not None:
            map(self.addFilter, get_as_list(self.filters_names))

        if self.output_dir:
            # remove leading and trailing whitespaces
            self.output_dir = self.output_dir.strip()

        if self.window_size:
            self.window_size_unit = extract_alphabetic(self.window_size,
                                                       convert=str.lower)
            self.window_size_value = extract_number(self.window_size,
                                                    convert=int)

        self.movie_multiprocessing_factor = nvl(
            self.movie_multiprocessing_factor,
            3 if multiprocessing.cpu_count() > 1 else 0)

        if not self.data_file == None:
            self.group_data_filename = None

        if isinstance(self.output_precision, str):
            self.output_precision = get_as_tuple(self.output_precision,
                                                 convert=int)
        elif self.output_precision == None:
            self.output_precision = DEFAULT_OUTPUT_PRECISION

        if self.add_headers == None:
            self.add_headers = True

        if len(self.statistics_classes) > 0:
            self.statistics_names = [
                s.__name__.replace("Statistic", "")
                for s in self.statistics_classes
            ]
Exemple #2
0
 def __init__(self,  output_file=None, output_dir=None, output_suffix=None,
              reference_filename=None, sort_headers=True,
              output_precision=None, print_output_file=False,
              ordinal_column_name=None, output_separator=None,
              add_headers=False, ordered_headers=None,
              message=None, output_prefix=None,
              ordered_headers_aliases=None):
     super(NumpyCSVFile, self).__init__(output_file, output_dir,
                 output_suffix, reference_filename, sort_headers,
                 ordinal_column_name=ordinal_column_name,
                 output_separator=output_separator,
                 add_headers=add_headers,
                 ordered_headers=ordered_headers,
                 output_prefix=output_prefix,
                 ordered_headers_aliases=ordered_headers_aliases)
     self.array_data = None
     self.__output_precision__ = get_as_tuple(output_precision, convert=int)
     self.__print_output_file__ = print_output_file
     self.__message__ = message
    def prepareParameters(self):
        """
        method prepares poincare plot parameters
        """
        if self.stepper:
            self.stepper_size = extract_number(self.stepper, convert=int)
            self.stepper_unit = extract_alphabetic(self.stepper, convert=str.lower)
        self.movie_dir = nvl(self.movie_dir, self.output_dir, "")

        if isinstance(self.excluded_annotations, str):
            self.excluded_annotations = get_as_list(self.excluded_annotations)

        if self.filters_names is not None:
            map(self.addFilter, get_as_list(self.filters_names))

        if self.output_dir:
            # remove leading and trailing whitespaces
            self.output_dir = self.output_dir.strip()

        if self.window_size:
            self.window_size_unit = extract_alphabetic(self.window_size, convert=str.lower)
            self.window_size_value = extract_number(self.window_size, convert=int)

        self.movie_multiprocessing_factor = nvl(
            self.movie_multiprocessing_factor, 3 if multiprocessing.cpu_count() > 1 else 0
        )

        if not self.data_file == None:
            self.group_data_filename = None

        if isinstance(self.output_precision, str):
            self.output_precision = get_as_tuple(self.output_precision, convert=int)
        elif self.output_precision == None:
            self.output_precision = DEFAULT_OUTPUT_PRECISION

        if self.add_headers == None:
            self.add_headers = True

        if len(self.statistics_classes) > 0:
            self.statistics_names = [s.__name__.replace("Statistic", "") for s in self.statistics_classes]