From ae26611654c930aeeed6e3596d3fb374c43447cc Mon Sep 17 00:00:00 2001 From: Tschan Date: Wed, 8 Jul 2026 23:27:23 +0200 Subject: [PATCH] Adding documentation for defs.OFR, renaming same folder to create a better module structure, updating the environment.yml file and setting up a batch job to create documentation. To execture batch job and create documentation, navigate to project directory in PowerShell and type 'Start-Process get_docu.bat' and press ENTER. --- defs/BTOF.py | 0 defs/{visualising.py => LabDevices.py} | 0 defs/{computing.py => OFR.py} | 114 ++- doc/defs/OFR.html | 653 ++++++++++++++++++ {docs => doc}/defs/index.html | 8 +- {docs => doc}/defs/visualising.html | 2 + docs/defs/computing.html | 317 --------- environment.yml | 372 +++++++++- get_doc.bat | 4 + main.py | 2 +- .../202607023_OFR_Analysis_01.ipynb | 4 +- 11 files changed, 1120 insertions(+), 356 deletions(-) create mode 100644 defs/BTOF.py rename defs/{visualising.py => LabDevices.py} (100%) rename defs/{computing.py => OFR.py} (79%) create mode 100644 doc/defs/OFR.html rename {docs => doc}/defs/index.html (92%) rename {docs => doc}/defs/visualising.html (95%) delete mode 100644 docs/defs/computing.html create mode 100644 get_doc.bat diff --git a/defs/BTOF.py b/defs/BTOF.py new file mode 100644 index 0000000..e69de29 diff --git a/defs/visualising.py b/defs/LabDevices.py similarity index 100% rename from defs/visualising.py rename to defs/LabDevices.py diff --git a/defs/computing.py b/defs/OFR.py similarity index 79% rename from defs/computing.py rename to defs/OFR.py index 1474bd0..92cd201 100644 --- a/defs/computing.py +++ b/defs/OFR.py @@ -1,3 +1,6 @@ +"""The docstring for this submodule +""" + ### ----------------------------------------------------------------------------------------------------------------------------------- ### ### IMPORTS AND CONFIGURATIONS @@ -11,6 +14,20 @@ import warnings class Distribution(): + r"""Object representing a distribution. + + Description + ----------- + Bla Bla Bla + + Attributes + ---------- + var: np.ndarray + A 1D array containing the (independent) variable, for instance the diameter $D$. + fct: np.ndarray + rA 1D array containing the dependent functional value, for instance count density $\frac{d\log_{10}N}{d\log_{10}D}$ + """ + def __init__(self, variable_array, function_array, form = 'log10'): self.var = variable_array @@ -20,6 +37,18 @@ class Distribution(): def transform(self, to = 'linear'): + """A method to transform distributions between different representations + + Description + ----------- + Bla bla bla + + Parameters + ---------- + to: str + Indicating into which representation the distribution should be transformed. Possible values are: `linear`, `ln` or `log10` + """ + if self.__form == to: warnings.warn("Already in desired format. Transformation has no effect.") return @@ -57,6 +86,20 @@ class Distribution(): self.__form = 'log10' def update_units(self, new_var_units, new_fct_units): + + """A method to update the units of the distribution + + Description + ----------- + Bla Bla Bla + + Parameters + ---------- + new_var_units: float + The SI factor used to transform the independent variable `self.var` + new_fct_units: float + The SI factor used to transform the dependent variable `self.fct` + """ old_from = self.__form self.transform(to='linear') @@ -67,6 +110,14 @@ class Distribution(): self.transform(to=old_from) def integrate(self) -> np.float64: + + """A method to integrate over the spectrum $dN/d f(D)$ + + Description + ----------- + Bla Bla Bla + """ + return np.trapezoid(y = self.fct, x = self.var) def median(): @@ -219,6 +270,26 @@ class OFRSample: class OFRAnalyser: + """An object representing an OFR experiment + + Description + ----------- + Bla Bla Bla + + Attributes + ---------- + data_source_file: str + A string pointing to the data source file + flows_source_file: str + A string pointing to the flow data source file + sample_number_list: [int] + A list of integers indicating which samples to consider + max_samples: int + The highest sample available in the data + data: pandas.DataFrame + A dataframe containing all the data + """ + def __init__(self, data_source_file, flows_source_file, sample_number_list, data_separator = ',') -> None: self.data_source_file = data_source_file @@ -248,6 +319,13 @@ class OFRAnalyser: def GetData(self) -> None: + """Method to get the data + + Description + ----------- + Bla Bla Bla + """ + # TODO make this work also for a specific sample! # TODO convert everything is SI units, making live a lot easier... @@ -328,24 +406,24 @@ class OFRAnalyser: mass_produced = [(mpr * duration) for mpr, duration in zip(mass_production_rate, sampling_times)] cumulative_mass_produced = np.cumsum(np.array(mass_produced)).tolist() - self.data = pd.DataFrame({'Sample (-)': numbers_of_sample, - 'Number (#/m^3)': number_concentrations, - 'Length (m/m^3)': length_concentrations, - 'Surface (m^2/m^3)': surface_concentrations, - 'Volume (m^3/m^3)': volume_concentrations, - 'Density (kg/m^3)': aerosol_densities, - 'Mass (kg/m^3)': mass_concentrations, - 'Start (s)': starting_times, - 'Stop (s)': stopping_times, - 'Duration (s)': sampling_times, - 'Dry Air Flow (m^3/s)': dry_air_flows, - 'Species Flow (m^3/s)': species_flows, - 'Ozone Flow (m^3/s)': ozone_flows, - 'Total Flow (m^3/s)': total_flows, - 'CPC Flow (m^3/s)': cpc_flows, - 'Mass Production Rate (kg/s)': mass_production_rate, - 'Mass Produced (kg)': mass_produced, - 'Cumulative Mass Produced (kg)': cumulative_mass_produced}) + self.data = pd.DataFrame({'Sample (-)': numbers_of_sample, + 'Number (#/m^3)': number_concentrations, + 'Length (m/m^3)': length_concentrations, + 'Surface (m^2/m^3)': surface_concentrations, + 'Volume (m^3/m^3)': volume_concentrations, + 'Density (kg/m^3)': aerosol_densities, + 'Mass (kg/m^3)': mass_concentrations, + 'Start (s)': starting_times, + 'Stop (s)': stopping_times, + 'Duration (s)': sampling_times, + 'Dry Air Flow (m^3/s)': dry_air_flows, + 'Species Flow (m^3/s)': species_flows, + 'Ozone Flow (m^3/s)': ozone_flows, + 'Total Flow (m^3/s)': total_flows, + 'CPC Flow (m^3/s)': cpc_flows, + 'Mass Production Rate (kg/s)': mass_production_rate, + 'Mass Produced (kg)': mass_produced, + 'Cumulative Mass Produced (kg)': cumulative_mass_produced}) ### ----------------------------------------------------------------------------------------------------------------------------------- ### diff --git a/doc/defs/OFR.html b/doc/defs/OFR.html new file mode 100644 index 0000000..90e26f9 --- /dev/null +++ b/doc/defs/OFR.html @@ -0,0 +1,653 @@ + + + + + + +defs.OFR API documentation + + + + + + + + + + + + + +
+
+
+

Module defs.OFR

+
+
+

The docstring for this submodule

+
+
+
+
+
+
+
+
+

Classes

+
+
+class Distribution +(variable_array, function_array, form='log10') +
+
+

Object representing a distribution.

+

Description

+

Bla Bla Bla

+

Attributes

+
+
var : np.ndarray
+
A 1D array containing the (independent) variable, for instance the diameter $D$.
+
fct : np.ndarray
+
rA 1D array containing the dependent functional value, for instance count density $\frac{d\log_{10}N}{d\log_{10}D}$
+
+
+ +Expand source code + +
class Distribution():
+
+    r"""Object representing a distribution.
+
+    Description
+    -----------
+    Bla Bla Bla
+
+    Attributes
+    ----------
+    var: np.ndarray
+        A 1D array containing the (independent) variable, for instance the diameter $D$.
+    fct: np.ndarray
+        rA 1D array containing the dependent functional value, for instance count density $\frac{d\log_{10}N}{d\log_{10}D}$
+    """
+
+    def __init__(self, variable_array, function_array, form = 'log10'):
+
+        self.var = variable_array
+        self.fct = function_array
+
+        self.__form = form
+
+    def transform(self, to = 'linear'):
+
+        """A method to transform distributions between different representations
+        
+        Description
+        -----------
+        Bla bla bla
+
+        Parameters
+        ----------
+        to: str
+            Indicating into which representation the distribution should be transformed. Possible values are: `linear`, `ln` or `log10`
+        """
+
+        if self.__form == to:
+            warnings.warn("Already in desired format. Transformation has no effect.")
+            return
+
+        # TODO: check the transformations! 
+        # TODO: check the order of the transformation (first variable, then function, or vice versa) to avoid having a mess!
+
+        match to:
+            case 'linear':
+                if self.__form == 'ln':
+                    self.var = np.exp(self.var)
+                    self.fct = np.divide(self.fct, self.var)
+                    self.__form = 'linear'
+                elif self.__form == 'log10':
+                    self.var = np.power(10, self.var)
+                    self.fct = np.divide(self.fct, self.var * np.log(10))
+                    self.__form = 'linear'
+            case 'ln':
+                if self.__form == 'linear':
+                    self.var = np.log(self.var)
+                    self.fct = np.multiply(self.var, self.fct)
+                    self.__form = 'ln'
+                elif self.__form == 'log10':
+                    self.var = np.log(np.power(10, self.var))
+                    self.fct = np.divide(self.fct, np.log(10))
+                    self.__form = 'ln'
+            case 'log10':
+                if self.__form == 'linear':
+                    self.fct = np.multiply(self.var, self.fct * np.log(10))
+                    self.var = np.log10(self.var)
+                    self.__form = 'log10'
+                elif self.__form == 'ln':
+                    self.var = np.log10(np.exp(self.var))
+                    self.fct = np.multiply(self.fct, np.log(10))
+                    self.__form = 'log10'
+
+    def update_units(self, new_var_units, new_fct_units):
+
+        """A method to update the units of the distribution
+        
+        Description
+        -----------
+        Bla Bla Bla
+        
+        Parameters
+        ----------
+        new_var_units: float
+            The SI factor used to transform the independent variable `self.var`
+        new_fct_units: float
+            The SI factor used to transform the dependent variable `self.fct`
+        """
+        
+        old_from = self.__form
+        self.transform(to='linear')
+
+        self.var = self.var * new_var_units
+        self.fct = self.fct * new_fct_units
+
+        self.transform(to=old_from)
+
+    def integrate(self) -> np.float64:
+
+        """A method to integrate over the spectrum $dN/d f(D)$
+        
+        Description
+        -----------
+        Bla Bla Bla
+        """
+
+        return np.trapezoid(y = self.fct, x = self.var)
+    
+    def median():
+        # TODO: implement that method
+        pass
+    
+    def mode():
+        # TODO: implement that method
+        pass
+
+    def mean():
+        # TODO: implement that method
+        pass
+
+    def variance():
+        # TODO: implement that method
+        pass
+
+

Methods

+
+
+def integrate(self) ‑> numpy.float64 +
+
+

A method to integrate over the spectrum $dN/d f(D)$

+

Description

+

Bla Bla Bla

+
+
+def mean() +
+
+
+
+
+def median() +
+
+
+
+
+def mode() +
+
+
+
+
+def transform(self, to='linear') +
+
+

A method to transform distributions between different representations

+

Description

+

Bla bla bla

+

Parameters

+
+
to : str
+
Indicating into which representation the distribution should be transformed. Possible values are: linear, ln or log10
+
+
+
+def update_units(self, new_var_units, new_fct_units) +
+
+

A method to update the units of the distribution

+

Description

+

Bla Bla Bla

+

Parameters

+
+
new_var_units : float
+
The SI factor used to transform the independent variable self.var
+
new_fct_units : float
+
The SI factor used to transform the dependent variable self.fct
+
+
+
+def variance() +
+
+
+
+
+
+
+class OFRAnalyser +(data_source_file, flows_source_file, sample_number_list, data_separator=',') +
+
+

An object representing an OFR experiment

+

Description

+

Bla Bla Bla

+

Attributes

+
+
data_source_file : str
+
A string pointing to the data source file
+
flows_source_file : str
+
A string pointing to the flow data source file
+
sample_number_list : [int]
+
A list of integers indicating which samples to consider
+
max_samples : int
+
The highest sample available in the data
+
data : pandas.DataFrame
+
A dataframe containing all the data
+
+
+ +Expand source code + +
class OFRAnalyser:
+
+    """An object representing an OFR experiment
+    
+    Description
+    -----------
+    Bla Bla Bla
+
+    Attributes
+    ----------
+    data_source_file: str
+        A string pointing to the data source file
+    flows_source_file: str
+        A string pointing to the flow data source file
+    sample_number_list: [int]
+        A list of integers indicating which samples to consider
+    max_samples: int
+        The highest sample available in the data
+    data: pandas.DataFrame
+        A dataframe containing all the data
+    """
+
+    def __init__(self, data_source_file, flows_source_file, sample_number_list, data_separator = ',') -> None:
+        
+        self.data_source_file = data_source_file
+        self.flows_source_file = flows_source_file
+        self.sample_number_list = sample_number_list
+        self.__data_separator = data_separator
+
+        with open(self.data_source_file, 'r', errors = 'ignore') as file:
+            for i, line in enumerate(file.readlines()):
+                if i == 17:
+                    items = line.split(',')
+                    max_sample_number = int(len(items) / 2)
+                else:
+                    continue
+
+        self.max_samples = max_sample_number
+        self.data = None
+
+    def __sample_number_list_check(self, sample_number_list) -> None:
+
+        # TODO: implement a similar check for the flow data file!
+
+        last_sample = sample_number_list[-1]
+
+        if last_sample > self.max_samples:
+            raise IndexError("The last sample(s) are out of range of the number of recorded samples")
+
+    def GetData(self) -> None:
+
+        """Method to get the data
+        
+        Description
+        -----------
+        Bla Bla Bla
+        """
+
+        # TODO make this work also for a specific sample!
+        # TODO convert everything is SI units, making live a lot easier...
+
+        self.__sample_number_list_check(self.sample_number_list)
+
+        numbers_of_sample           = []    # (-)
+        number_concentrations       = []    # (#/m^3)
+        length_concentrations       = []    # (m/m^3)
+        surface_concentrations      = []    # (m^2/m^3)
+        volume_concentrations       = []    # (m^3/m^3)
+        aerosol_densities           = []    # (kg/m^3)
+        mass_concentrations         = []    # (kg/m^3)
+        starting_times              = []    # (s)
+        stopping_times              = []    # (s)
+        sampling_times              = []    # (s)
+        dry_air_flows               = []    # (m^3/s)
+        species_flows               = []    # (m^3/s)
+        ozone_flows                 = []    # (m^3/s)
+        total_flows                 = None  # (m^3/s)
+        cpc_flows                   = []    # (m^3/s)
+        mass_production_rate        = None  # (kg/s)
+        mass_produced               = None  # (kg)
+        cumulative_mass_produced    = None  # (kg)
+
+
+        for sample_number in self.sample_number_list:
+            sample = OFRSample(source_file=self.data_source_file, sample_number = sample_number, data_separator = self.__data_separator)
+
+            numbers_of_sample.append(sample_number)
+            number_concentrations.append(sample.Count.integrate())
+            length_concentrations.append(sample.Length.integrate())
+            surface_concentrations.append(sample.Surface.integrate())
+            volume_concentrations.append(sample.Volume.integrate())
+            aerosol_densities.append(sample.SOA_density)
+            mass_concentrations.append(sample.Mass.integrate())
+
+            starting_times.append((sample_number - 1) * sample.sampling_time)
+            stopping_times.append(sample_number * sample.sampling_time)
+
+            sampling_times.append(sample.sampling_time)
+
+        out_flag = False
+
+        with open(self.flows_source_file, 'r', errors='ignore') as file:
+
+            j = 1
+
+            for line_counter, line in enumerate(file.readlines()):
+
+                if out_flag == True:
+                    continue
+
+                if line_counter >= 6:
+
+                    if line.startswith('-'):
+                        out_flag = True
+                        continue
+
+                    i = 0
+                    items = line.split()
+
+                    while i < int(items[-1]):
+
+                        if j in self.sample_number_list:
+                            dry_air_flows.append(float(items[0]) * 6E-4)
+                            species_flows.append(float(items[1]) * 6E-4)
+                            ozone_flows.append(float(items[2]) * 6E-4)
+                            cpc_flows.append(float(items[3]) * 6E-4)
+
+                        i += 1
+                        j += 1
+
+                else:
+                    continue
+
+        total_flows = [(flow_1 + flow_2 + flow_3) for flow_1, flow_2, flow_3 in zip(dry_air_flows, species_flows, ozone_flows)]
+        mass_production_rate = [(mass * flow) for mass, flow in zip(mass_concentrations, total_flows)]
+        mass_produced = [(mpr * duration) for mpr, duration in zip(mass_production_rate, sampling_times)]
+        cumulative_mass_produced = np.cumsum(np.array(mass_produced)).tolist()
+
+        self.data = pd.DataFrame({'Sample (-)':                     numbers_of_sample,
+                                  'Number (#/m^3)':                 number_concentrations,
+                                  'Length (m/m^3)':                 length_concentrations,
+                                  'Surface (m^2/m^3)':              surface_concentrations,
+                                  'Volume (m^3/m^3)':               volume_concentrations,
+                                  'Density (kg/m^3)':               aerosol_densities,
+                                  'Mass (kg/m^3)':                  mass_concentrations,
+                                  'Start (s)':                      starting_times,
+                                  'Stop (s)':                       stopping_times, 
+                                  'Duration (s)':                   sampling_times,
+                                  'Dry Air Flow (m^3/s)':           dry_air_flows,
+                                  'Species Flow (m^3/s)':           species_flows,
+                                  'Ozone Flow (m^3/s)':             ozone_flows,
+                                  'Total Flow (m^3/s)':             total_flows,
+                                  'CPC Flow (m^3/s)':               cpc_flows,
+                                  'Mass Production Rate (kg/s)':    mass_production_rate,
+                                  'Mass Produced (kg)':             mass_produced,
+                                  'Cumulative Mass Produced (kg)':  cumulative_mass_produced})
+
+

Methods

+
+
+def GetData(self) ‑> None +
+
+

Method to get the data

+

Description

+

Bla Bla Bla

+
+
+
+
+class OFRSample +(source_file, sample_number, data_separator=',') +
+
+

Object to represent a single sample from the OFR

+

Description

+

Bla bla bla

+

Attributes

+
+
number : int
+
The sample number
+
sourcefile : str
+
The path to the data file
+
headlines : int
+
The number of lines in the data file until raw data is reached
+
lower_bound : float
+
The lower bound diameter (nm) of the SMPS
+
upper_bound : float
+
The upper bound diameter (nm) of the SMPS
+
scan_up : float
+
The time (s) to ramp up voltage in SMPS
+
scan_down : float
+
The time (s) to ramp voltage back down in SMPS
+
delta_time : float
+
The time interval (s) between two measured data points of the raw count density
+
SOA_density : float
+
The density (kg/m3) of the SOA produced in the OFR
+
+
+ +Expand source code + +
class OFRSample:
+
+    """Object to represent a single sample from the OFR
+
+    Description
+    -----------
+    Bla bla bla
+
+    Attributes
+    ----------
+
+    number: int
+        The sample number
+    sourcefile: str
+        The path to the data file
+    headlines: int
+        The number of lines in the data file until raw data is reached
+    lower_bound: float
+        The lower bound diameter (nm) of the SMPS
+    upper_bound: float
+        The upper bound diameter (nm) of the SMPS
+    scan_up: float
+        The time (s) to ramp up voltage in SMPS
+    scan_down: float
+        The time (s) to ramp voltage back down in SMPS
+    delta_time: float
+        The time interval (s) between two measured data points of the raw count density
+    SOA_density: float
+        The density (kg/m3) of the SOA produced in the OFR
+    """
+
+    def __get_data(self) -> np.float64:
+
+        footer_flag = False
+        footer_start_index = 0
+        data_flag = False
+        data_lines = []
+
+        midpoints = []
+        counts = []
+
+        with open(self.source_file, 'r', errors = 'ignore') as file:
+            for i, line in enumerate(file.readlines()):
+                if i == 20:
+                    data_flag = True
+                    continue
+                if data_flag == True:
+                    data_lines.append(line)
+                if line.split(self.__data_separator)[0] == 'Scan Up Time(s)':
+                    data_flag = False
+                    footer_flag = True
+                    footer_start_index = i
+                    self.scan_up_time = float(line.split(self.__data_separator)[1])
+                    continue
+                if footer_flag == False:
+                    continue
+                else:
+                    if i == footer_start_index + 1:
+                        self.scan_down_time = float(line.split(self.__data_separator)[1])
+                        continue
+                    elif i == footer_start_index + 6:
+                        self.aerosol_flow = float(line.split(self.__data_separator)[1])
+                        continue
+                    elif i == footer_start_index + 11:
+                        self.lower_diameter_bound = float(line.split(self.__data_separator)[1])
+                        continue
+                    elif i == footer_start_index + 12:
+                        self.upper_diameter_bound = float(line.split(self.__data_separator)[1])
+                        continue
+                    elif i == footer_start_index + 13:
+                        self.SOA_density = float(line.split(self.__data_separator)[1])
+                        continue
+        
+        self.sampling_time = self.scan_up_time + self.scan_down_time
+        data_lines.pop(-1)
+
+        for line in data_lines:
+            items = line.split(self.__data_separator)
+            local_diameter_midpoint = float(items[0])
+            if self.lower_diameter_bound <= local_diameter_midpoint and local_diameter_midpoint <= self.upper_diameter_bound:
+                midpoints.append(local_diameter_midpoint)
+                items.pop(0)
+                counts.append(float(items[(self.sample_number - 1) * 2]))
+            else:
+                continue
+        
+        self.aerosol_flow = self.aerosol_flow * 6E-4
+        self.SOA_density = self.SOA_density * 1E3
+        self.lower_diameter_bound = self.lower_diameter_bound * 1E-9
+        self.upper_diameter_bound = self.upper_diameter_bound * 1E-9
+
+
+        # Input data from file is in (nm)
+        return [np.array(midpoints), np.array(counts)]
+
+    def __init__(self, source_file, sample_number, data_separator = ','):
+        
+        ## VALUES READ IN FROM DISK
+        #--------------------------
+
+        # Sample information
+        self.source_file = source_file                  # where the data is stored, i.e. "C:/Users/tschan_d/..."
+        self.sample_number = sample_number              # sample number, i.e. 33
+        self.__data_separator = data_separator
+
+        self.scan_up_time = None                        # Time to scan up the voltage range in DMA, in (s)
+        self.scan_down_time = None                      # Time to scan down the voltage range in DMA, in(s)
+        self.sampling_time = None                       # Total time to scan voltage up and back down in DMA, in (s)
+
+        self.lower_diameter_bound = None                # Lower Diameter bound of CPC, in (nm)
+        self.upper_diameter_bound = None                # Upper Diameter bound of CPC, in (nm)
+        self.aerosol_flow = None                        # Aerosol flow, in (L/min)
+        self.SOA_density = None                         # Expected density of SOA, in (g/cm3)
+
+        # Distributions of the relevant quantities (all relative to nanometer)
+        data = self.__get_data()
+
+        # Getting Distribution objects
+        self.Count = Distribution(variable_array = np.log10(data[0]), function_array = data[1], form='log10')
+        self.Count.update_units(new_fct_units=1E15, new_var_units=1E-9)
+
+        self.Length = Distribution(variable_array = np.log10(data[0]), function_array = data[0]*data[1], form = 'log10')
+        self.Length.update_units(new_fct_units=1E6, new_var_units=1E-9)
+
+        self.Surface = Distribution(variable_array = np.log(data[0]), function_array = ((math.pi)* data[0] ** 2) * data[1], form = 'log10')
+        self.Surface.update_units(new_fct_units=1E-3, new_var_units=1E-9)
+
+        self.Volume = Distribution(variable_array = np.log10(data[0]),function_array = ((math.pi / 6) * data[0] ** 3) * data[1], form = 'log10')
+        self.Volume.update_units(new_fct_units=1E-12, new_var_units=1E-9)
+
+        self.Mass = Distribution(variable_array = self.Volume.var, function_array = self.Volume.fct * self.SOA_density, form='log10')
+
+
+
+
+
+ +
+ + + diff --git a/docs/defs/index.html b/doc/defs/index.html similarity index 92% rename from docs/defs/index.html rename to doc/defs/index.html index cbfbbb1..8b4d041 100644 --- a/docs/defs/index.html +++ b/doc/defs/index.html @@ -12,6 +12,8 @@ + + + - - - -
-
-
-

Module defs.computing

-
-
-
-
-
-
-
-
-
-
-

Classes

-
-
-class OFRAnalyser -(sourcefile, headlines=238, density=1.2, lower_bound=0, upper_bound=1896, scan_up=160, scan_down=20, flow_rate=5) -
-
-
-
- -Expand source code - -
class OFRAnalyser:
-
-    def __init__(self, sourcefile, headlines = 238, density=1.2, lower_bound = 0, upper_bound = 1896, scan_up=160, scan_down=20,
-                 flow_rate=5) -> None:
-        
-        # where to take data from:
-        self.sourcefile = sourcefile
-        # how many lines to skip until the raw counts data section is reached:
-        self.headlines = headlines
-        # assumed SOA density
-        self.density = density
-        self.lower_bound = lower_bound
-        self.upper_bound = upper_bound
-        self.scan_up = scan_up
-        self.scan_down = scan_down
-        self.flow_rate = flow_rate
-
-        with open(self.sourcefile) as file:
-            file_reader = csv.reader(file)
-            for index, row in enumerate(file_reader):
-                if index != self.headlines:
-                    continue
-                else:
-                    head_row = row
-
-        self.max_samples = int((len(head_row) - 1) / 2)
-
-        # total mass in mg
-        self.total_counts = None
-        self.total_surface = None
-        self.total_volume = None
-        self.total_mass = None
-
-    def __sample_number_list_check(self, sample_number_list) -> None:
-
-        last_sample = sample_number_list[-1]
-
-        if last_sample > self.max_samples:
-            raise IndexError("The last sample(s) are out of range of the number of recorded samples")
-
-    def AggregateSamples(self, samples = [1]) -> None:
-
-        self.__sample_number_list_check(samples)
-
-        counts = []
-        surfaces = []
-        volumes = []
-        masses = []
-
-        for samplenumber in samples:
-            sample = OFRSample(number=samplenumber, sourcefile=self.sourcefile, headlines=self.headlines, density=self.density,
-                                     lower_bound = self.lower_bound, upper_bound = self.upper_bound, scan_up = self.scan_up,
-                                     scan_down = self.scan_down)
-
-            counts.append(sample.total_count)
-            surfaces.append(sample.total_surface)
-            volumes.append(sample.total_volume)
-            masses.append(sample.total_mass)
-
-        self.total_count = sum(counts)
-        self.total_surface = sum(surfaces)
-        self.total_volume = sum(volumes)
-        self.total_mass = sum(masses)
-
-

Methods

-
-
-def AggregateSamples(self, samples=[1]) ‑> None -
-
-
-
-
-
-
-class OFRSample -(number, sourcefile, headlines, density, lower_bound, upper_bound, scan_up, scan_down, delta_time=0.1) -
-
-

Object to represent a single sample from the OFR

-

Description: Bla

-

Attributes

-
-
number : int
-
The sample number
-
sourcefile : str
-
The path to the data file
-
headlines : int
-
The number of lines in the data file until raw data is reached
-
lower_bound : float
-
The lower bound diameter (nm) of the SMPS
-
upper_bound : float
-
The upper bound diameter (nm) of the SMPS
-
scan_up : float
-
The time (s) to ramp up voltage in SMPS
-
scan_down : float
-
The time (s) to ramp voltage back down in SMPS
-
delta_time : float
-
The time interval (s) between two measured data points of the raw count density
-
SOA_density : float
-
The density (kg/m3) of the SOA produced in the OFR
-
-

Methods

-

init(number, sourcefile, headlines, density, lower_bound, upper_bound, scan_up, scan_down, delta_time) -> OFRSample: -The constructor of the Object

-

Constructor of a OFRSample object

-

Description:

-

Parameters

-
-
number : int
-
The sample number
-
-

Returns

-
-
None : None
-
Does not have a return value
-
-
- -Expand source code - -
class OFRSample:
-
-    """Object to represent a single sample from the OFR
-
-    Description: Bla
-
-    Attributes
-    ----------
-    number: int
-        The sample number
-    sourcefile: str
-        The path to the data file
-    headlines: int
-        The number of lines in the data file until raw data is reached
-    lower_bound: float
-        The lower bound diameter (nm) of the SMPS
-    upper_bound: float
-        The upper bound diameter (nm) of the SMPS
-    scan_up: float
-        The time (s) to ramp up voltage in SMPS
-    scan_down: float
-        The time (s) to ramp voltage back down in SMPS
-    delta_time: float
-        The time interval (s) between two measured data points of the raw count density
-    SOA_density: float
-        The density (kg/m3) of the SOA produced in the OFR
-    
-    Methods
-    -------
-    __init__(number, sourcefile, headlines, density, lower_bound, upper_bound, scan_up, scan_down, delta_time) -> OFRSample:
-        The constructor of the Object
-    """
-
-    def __init__(self, number, sourcefile, headlines, density, lower_bound, upper_bound, scan_up, scan_down, delta_time = 0.1):
-        
-        """Constructor of a OFRSample object
-        
-        Description:
-
-        Parameters
-        ----------
-        number: int
-            The sample number
-        
-        Returns
-        -------
-        None: None
-            Does not have a return value
-        """
-
-        # Sample information
-        self.number = number                # sample number, i.e. 33
-        self.sourcefile = sourcefile        # where the data is stored, "C:/Users/tschan_d/..."
-        self.headlines = headlines          # Number of lines before raw data is reached, usually 238
-        self.lower_bound = lower_bound      # Lower Diameter (nm) where CPC works
-        self.upper_bound = upper_bound      # Upper Diameter (nm) where CPC works
-        self.scan_up = scan_up              # Time to scan up the voltage range in DMA
-        self.scan_down = scan_down          # Time to ramp the voltage back down in DMA
-        self.delta_time = delta_time        # Measuring interval to get raw count density; (s)
-        self.SOA_density = density          # Expected density of SOA (kg/m3)
-
-        # Sample distributions
-        self.diameters = None               # Diameters (nm)
-        self.count_density = None           # Count Density (#/(m3*m*s))
-        self.surface_density = None         # Surface Density (m2/(m3*m*s))
-        self.volume_density = None          # Volume Density (m3/(m3*m*s))
-        self.mass_density = None            # Mass Density (kg/(m3*m*s))
-
-        self.total_count = None             # Total Count (#/(m3*s))
-        self.total_surface = None           # Total Surface (m2/(m3*s))
-        self.total_volume = None            # Total Volume (m3/(m3*s))
-        self.total_mass = None              # Total Mass (kg/(m3*s))
-
-        self.get_data()
-
-    def get_data(self):
-
-        columns = ['Diameter #' + str(self.number), 'Counts #' + str(self.number)]
-        sample_data = pd.read_csv(filepath_or_buffer=self.sourcefile, header=self.headlines, usecols=columns, index_col=False,
-                                  skipfooter=1, engine='python').to_numpy()
-        
-        filter_array = np.where((sample_data[:, 0] >= self.lower_bound) & (sample_data[:, 0] <= self.upper_bound), True, False)
-
-        # Particle Diameter: Raw data in (nm) -> Output data in (m): 1 nm = 1E-9 m
-        self.diameters = sample_data[filter_array, 0] * 1E-9
-
-        # Particle Count Density: Raw data in (#/(cm3*nm*0.1s)) -> Output data in (#/(m3*m*s)): 1/(cm3*nm*s) = 1E16/(m3*m*s)
-        self.count_density = sample_data[filter_array, 1] * 1E16
-
-        self.surface_density = np.multiply(math.pi * self.diameters ** 2, self.count_density)
-        self.volume_density = np.multiply((math.pi / 6) * self.diameters ** 3, self.count_density)
-        self.mass_density = np.multiply(self.SOA_density, self.volume_density)
-
-        self.total_count = self.__integrator(integrand = self.count_density)
-        self.total_surface = self.__integrator(integrand = self.surface_density)
-        self.total_volume = self.__integrator(integrand = self.volume_density)
-        self.total_mass = self.total_volume * self.SOA_density
-
-    def __integrator(self, integrand: np.float64) -> np.float64:
-
-        return np.trapezoid(y = integrand, x = self.diameters)
-
-

Methods

-
-
-def get_data(self) -
-
-
-
-
-
-
-
-
- -
- - - diff --git a/environment.yml b/environment.yml index c907684..1eb2f5b 100644 --- a/environment.yml +++ b/environment.yml @@ -2,18 +2,360 @@ name: MA channels: - conda-forge dependencies: - - python=3.12 - - ipython - - ipykernel - - ipywidgets - - matplotlib - - jupyterlab - - notebook - - numpy - - pandas - - seaborn - - scipy - - sympy - - cython - - spyder - - pip \ No newline at end of file + - _openmp_mutex=4.5=20_gnu + - _python_abi3_support=1.0=hd8ed1ab_2 + - aiohappyeyeballs=2.6.2=pyhd8ed1ab_0 + - aiohttp=3.14.1=py312h6b91d65_0 + - aiosignal=1.4.0=pyhd8ed1ab_0 + - alabaster=1.0.0=pyhd8ed1ab_1 + - anyio=4.13.0=pyhcf101f3_0 + - argon2-cffi=25.1.0=pyhd8ed1ab_0 + - argon2-cffi-bindings=25.1.0=py312he06e257_2 + - arrow=1.4.0=pyhcf101f3_0 + - astroid=4.0.4=py312h2e8e312_0 + - asttokens=3.0.1=pyhd8ed1ab_0 + - async-lru=2.3.0=pyhcf101f3_0 + - asyncssh=2.23.0=pyhd8ed1ab_0 + - attrs=26.1.0=pyhcf101f3_0 + - autopep8=2.0.4=pyhd8ed1ab_0 + - babel=2.18.0=pyhcf101f3_1 + - backports=1.0=pyhd8ed1ab_5 + - backports.tarfile=1.2.0=pyhcf101f3_2 + - backports.zstd=1.6.0=py312h06d0912_0 + - bcrypt=5.0.0=py312hdabe01f_1 + - beautifulsoup4=4.15.0=pyha770c72_0 + - binaryornot=0.6.0=pyhcf101f3_0 + - black=26.5.1=pyh866005b_0 + - bleach=6.3.0=pyhcf101f3_0 + - bleach-with-css=6.3.0=h5f6438b_0 + - bokeh=3.9.1=pyhd8ed1ab_0 + - brotli=1.2.0=h2d644bc_1 + - brotli-bin=1.2.0=hfd05255_1 + - brotli-python=1.2.0=py312hc6d9e41_1 + - bzip2=1.0.8=h0ad9c76_9 + - ca-certificates=2026.6.17=h4c7d964_0 + - cached-property=1.5.2=hd8ed1ab_1 + - cached_property=1.5.2=pyha770c72_1 + - cairo=1.18.4=h477c42c_1 + - cattrs=26.1.0=pyhcf101f3_1 + - certifi=2026.6.17=pyhd8ed1ab_0 + - cffi=2.0.0=py312he06e257_1 + - chardet=7.4.3=pyhcf101f3_0 + - charset-normalizer=3.4.7=pyhd8ed1ab_0 + - click=8.4.1=pyh6dadd2b_0 + - cloudpickle=3.1.2=pyhcf101f3_1 + - colorama=0.4.6=pyhd8ed1ab_1 + - comm=0.2.3=pyhe01879c_0 + - contourpy=1.3.3=py312h78d62e6_4 + - cookiecutter=2.7.1=pyhcf101f3_0 + - cpython=3.12.13=py312hd8ed1ab_0 + - cryptography=49.0.0=py312h232196e_0 + - cycler=0.12.1=pyhcf101f3_2 + - cython=3.2.5=py312hd245ac3_0 + - debugpy=1.8.21=py312ha1a9051_0 + - decorator=5.3.1=pyhd8ed1ab_0 + - defusedxml=0.7.1=pyhd8ed1ab_0 + - deprecated=1.3.1=pyhd8ed1ab_1 + - diff-match-patch=20241021=pyhd8ed1ab_1 + - dill=0.4.1=pyhcf101f3_0 + - docstring-to-markdown=0.17=pyhe01879c_0 + - docutils=0.22.4=pyhd8ed1ab_0 + - double-conversion=3.4.0=hac47afa_0 + - exceptiongroup=1.3.1=pyhd8ed1ab_0 + - executing=2.2.1=pyhd8ed1ab_0 + - flake8=7.1.2=pyhd8ed1ab_0 + - font-ttf-dejavu-sans-mono=2.37=hab24e00_0 + - font-ttf-inconsolata=3.000=h77eed37_0 + - font-ttf-source-code-pro=2.038=h77eed37_0 + - font-ttf-ubuntu=0.83=h77eed37_3 + - fontconfig=2.18.1=hd47e2ca_0 + - fonts-conda-ecosystem=1=0 + - fonts-conda-forge=1=hc364b38_1 + - fonttools=4.63.0=py312h05f76fc_0 + - fqdn=1.5.1=pyhd8ed1ab_1 + - freetype=2.14.3=h57928b3_1 + - fribidi=1.0.16=hfd05255_0 + - frozenlist=1.8.0=py312hfdf67e6_0 + - fzf=0.73.1=hd02998f_0 + - glib=2.88.1=h355229b_2 + - glib-tools=2.88.1=h81d4522_2 + - graphite2=1.3.15=hac47afa_0 + - gst-plugins-base=1.26.11=h88486b4_0 + - gstreamer=1.26.11=hae9036a_0 + - h11=0.16.0=pyhcf101f3_1 + - h2=4.3.0=pyhcf101f3_0 + - harfbuzz=14.2.1=h5a1b470_0 + - hpack=4.1.0=pyhd8ed1ab_0 + - httpcore=1.0.9=pyh29332c3_0 + - httpx=0.28.1=pyhd8ed1ab_0 + - hyperframe=6.1.0=pyhd8ed1ab_0 + - icu=78.3=h637d24d_0 + - idna=3.17=pyhcf101f3_0 + - imagesize=2.0.0=pyhd8ed1ab_0 + - importlib-metadata=9.0.0=pyhcf101f3_0 + - importlib_resources=7.1.0=pyhd8ed1ab_0 + - inflection=0.5.1=pyhd8ed1ab_1 + - intervaltree=3.1.0=pyhd8ed1ab_1 + - ipykernel=6.31.0=pyh6dadd2b_0 + - ipython=9.14.1=pyhe2676ad_0 + - ipython_pygments_lexers=1.1.1=pyhd8ed1ab_0 + - ipywidgets=8.1.8=pyhd8ed1ab_0 + - isoduration=20.11.0=pyhd8ed1ab_1 + - isort=8.0.1=pyhd8ed1ab_0 + - jaraco.classes=3.4.0=pyhcf101f3_3 + - jaraco.context=6.1.2=pyhcf101f3_0 + - jaraco.functools=4.5.0=pyhcf101f3_0 + - jedi=0.19.2=pyhd8ed1ab_1 + - jellyfish=1.2.1=py312hb0142fd_1 + - jinja2=3.1.6=pyhcf101f3_1 + - json5=0.14.0=pyhd8ed1ab_0 + - jsonpointer=3.1.1=pyhcf101f3_0 + - jsonschema=4.26.0=pyhcf101f3_0 + - jsonschema-specifications=2025.9.1=pyhcf101f3_0 + - jsonschema-with-format-nongpl=4.26.0=hcf101f3_0 + - jupyter-lsp=2.3.1=pyhcf101f3_0 + - jupyter_client=8.9.1=pyhcf101f3_0 + - jupyter_core=5.9.1=pyh6dadd2b_0 + - jupyter_events=0.12.1=pyhcf101f3_0 + - jupyter_server=2.19.0=pyhcf101f3_0 + - jupyter_server_terminals=0.5.4=pyhcf101f3_0 + - jupyterlab=4.5.8=pyhd8ed1ab_0 + - jupyterlab_pygments=0.3.0=pyhd8ed1ab_2 + - jupyterlab_server=2.28.0=pyhcf101f3_0 + - jupyterlab_widgets=3.0.16=pyhcf101f3_1 + - keyring=25.7.0=pyh7428d3b_0 + - kiwisolver=1.5.0=py312h78d62e6_0 + - krb5=1.22.2=h0ea6238_0 + - lark=1.3.1=pyhd8ed1ab_0 + - lcms2=2.19.1=hf2c6c5f_1 + - lerc=4.1.0=hd936e49_0 + - libblas=3.11.0=8_h8455456_mkl + - libbrotlicommon=1.2.0=hfd05255_1 + - libbrotlidec=1.2.0=hfd05255_1 + - libbrotlienc=1.2.0=hfd05255_1 + - libcblas=3.11.0=8_h2a3cdd5_mkl + - libclang13=22.1.7=default_ha2db4b5_1 + - libdeflate=1.25=h51727cc_0 + - libexpat=2.8.1=hac47afa_1 + - libffi=3.5.2=h3d046cb_0 + - libfreetype=2.14.3=h57928b3_1 + - libfreetype6=2.14.3=hdbac1cb_1 + - libgcc=15.2.0=h8ee18e1_19 + - libglib=2.88.1=h7ce1215_2 + - libgomp=15.2.0=h8ee18e1_19 + - libhwloc=2.13.0=default_h049141e_1000 + - libiconv=1.18=hc1393d2_2 + - libintl=0.22.5=h5728263_3 + - libintl-devel=0.22.5=h5728263_3 + - libjpeg-turbo=3.1.4.1=hfd05255_0 + - liblapack=3.11.0=8_hf9ab0e9_mkl + - liblzma=5.8.3=hfd05255_0 + - libogg=1.3.5=h2466b09_1 + - libpng=1.6.58=h7351971_0 + - libsodium=1.0.22=h6a83c73_1 + - libspatialindex=2.1.0=h2854ae6_1 + - libsqlite=3.53.2=hf5d6505_0 + - libtiff=4.7.1=h8f73337_1 + - libvorbis=1.3.7=h5112557_2 + - libvulkan-loader=1.4.341.0=h477610d_0 + - libwebp=1.6.0=h4d5522a_0 + - libwebp-base=1.6.0=h4d5522a_0 + - libwinpthread=12.0.0.r4.gg4f2fc60ca=h57928b3_10 + - libxcb=1.17.0=h0e4246c_0 + - libxml2=2.15.3=h8ef44ab_0 + - libxml2-16=2.15.3=h3cfd58e_0 + - libxslt=1.1.43=h0fbe4c1_1 + - libzlib=1.3.2=hfd05255_2 + - llvm-openmp=22.1.7=h4fa8253_0 + - lsprotocol=2025.0.0=pyhe01879c_0 + - mako=1.3.12=pyhcf101f3_0 + - markdown=3.10.2=pyhcf101f3_0 + - markdown-it-py=4.2.0=pyhd8ed1ab_0 + - markupsafe=3.0.3=py312h05f76fc_1 + - matplotlib=3.10.9=py312h2e8e312_0 + - matplotlib-base=3.10.9=py312h0ebf65c_0 + - matplotlib-inline=0.2.2=pyhd8ed1ab_0 + - mccabe=0.7.0=pyhd8ed1ab_1 + - mdurl=0.1.2=pyhd8ed1ab_1 + - mistune=3.2.1=pyhcf101f3_0 + - mkl=2026.0.0=hac47afa_908 + - more-itertools=11.1.0=pyhcf101f3_0 + - mpmath=1.4.1=pyhd8ed1ab_0 + - multidict=6.7.1=py312h05f76fc_0 + - munkres=1.1.4=pyhd8ed1ab_1 + - mypy_extensions=1.1.0=pyha770c72_0 + - narwhals=2.23.0=pyhcf101f3_0 + - nbclient=0.11.0=pyhd8ed1ab_0 + - nbconvert=7.17.1=hb502eef_0 + - nbconvert-core=7.17.1=pyhcf101f3_0 + - nbconvert-pandoc=7.17.1=h08b4883_0 + - nbformat=5.10.4=pyhd8ed1ab_1 + - nest-asyncio=1.6.0=pyhd8ed1ab_1 + - notebook=7.5.7=pyhcf101f3_1 + - notebook-shim=0.2.4=pyhd8ed1ab_1 + - numpy=2.4.6=py312ha3f287d_0 + - numpydoc=1.10.0=pyhcf101f3_0 + - onemkl-license=2026.0.0=h57928b3_908 + - openjpeg=2.5.4=h0e57b4f_0 + - openssl=3.6.3=hf411b9b_0 + - overrides=7.7.0=pyhd8ed1ab_1 + - packaging=26.2=pyhc364b38_0 + - pandas=3.0.3=py312h95189c4_0 + - pandoc=3.10=h57928b3_0 + - pandocfilters=1.5.0=pyhd8ed1ab_0 + - pango=1.56.4=h13911b6_1 + - parso=0.8.7=pyhcf101f3_0 + - pathspec=1.1.1=pyhd8ed1ab_0 + - patsy=1.0.2=pyhcf101f3_0 + - pcre2=10.47=hd2b5f0e_0 + - pdoc3=0.11.1=pyhd8ed1ab_0 + - pexpect=4.9.0=pyhd8ed1ab_1 + - pickleshare=0.7.5=pyhd8ed1ab_1004 + - pillow=12.2.0=py312h31f0997_0 + - pip=26.1.2=pyh8b19718_0 + - pixman=0.46.4=h5112557_1 + - platformdirs=4.10.0=pyhcf101f3_0 + - pluggy=1.6.0=pyhf9edf01_1 + - ply=3.11=pyhd8ed1ab_3 + - prometheus_client=0.25.0=pyhd8ed1ab_0 + - prompt-toolkit=3.0.52=pyha770c72_0 + - propcache=0.5.2=py312h05f76fc_0 + - psutil=7.2.2=py312he5662c2_0 + - pthread-stubs=0.4=h0e40799_1002 + - ptyprocess=0.7.0=pyhd8ed1ab_1 + - pure_eval=0.2.3=pyhd8ed1ab_1 + - pycodestyle=2.12.1=pyhd8ed1ab_1 + - pyconify=0.2.1=pyhd8ed1ab_0 + - pycparser=3.0=pyhcf101f3_0 + - pydocstyle=6.3.0=pyhd8ed1ab_1 + - pyflakes=3.2.0=pyhd8ed1ab_1 + - pygithub=2.9.1=pyhd8ed1ab_0 + - pygments=2.20.0=pyhd8ed1ab_0 + - pyjwt=2.13.0=pyhcf101f3_0 + - pylint=4.0.6=pyhcf101f3_0 + - pylint-venv=3.0.4=pyhd8ed1ab_1 + - pyls-spyder=0.4.0=pyhd8ed1ab_1 + - pynacl=1.6.2=py312h297b7f0_2 + - pyopenssl=26.3.0=pyhcf101f3_0 + - pyparsing=3.3.2=pyhcf101f3_0 + - pyqt=5.15.11=py312h7eb3e20_2 + - pyqt5-sip=12.17.0=py312hbb81ca0_2 + - pyqtwebengine=5.15.11=py312hffa3973_2 + - pyside6=6.11.1=py312ha7d0d2e_1 + - pysocks=1.7.1=pyh09c184e_7 + - python=3.12.13=h0159041_0_cpython + - python-dateutil=2.9.0.post0=pyhe01879c_2 + - python-fastjsonschema=2.21.2=pyhe01879c_0 + - python-gil=3.12.13=hd8ed1ab_0 + - python-gssapi=1.11.1=py312hcf70c7a_1 + - python-json-logger=4.1.0=pyhd8ed1ab_0 + - python-lsp-black=2.0.0=pyhff2d567_1 + - python-lsp-jsonrpc=1.1.2=pyhff2d567_1 + - python-lsp-ruff=2.3.1=pyhcf101f3_0 + - python-lsp-server=1.14.0=pyh332efcf_0 + - python-lsp-server-base=1.14.0=pyhd8ed1ab_0 + - python-slugify=8.0.4=pyhd8ed1ab_1 + - python-tzdata=2026.2=pyhd8ed1ab_0 + - python_abi=3.12=8_cp312 + - pytokens=0.4.1=py312he5662c2_2 + - pytoolconfig=1.2.5=pyhd8ed1ab_1 + - pyuca=1.2=pyhd8ed1ab_2 + - pywin32=312=py312h829343e_0 + - pywin32-ctypes=0.2.3=py312h2e8e312_3 + - pywinpty=2.0.15=py312h275cf98_1 + - pyyaml=6.0.3=py312h05f76fc_1 + - pyzmq=27.1.0=py312h343a6d4_3 + - qdarkstyle=3.2.3=pyhd8ed1ab_1 + - qhull=2020.2=hc790b64_5 + - qstylizer=0.2.4=pyhff2d567_0 + - qt-main=5.15.15=hc95f6a6_8 + - qt-webengine=5.15.15=h087ee03_1 + - qt6-main=6.11.1=pl5321hfcac499_1 + - qtawesome=1.4.2=pyh9208f05_0 + - qtconsole=5.7.2=pyhd8ed1ab_0 + - qtconsole-base=5.7.2=pyha770c72_0 + - qtpy=2.4.3=pyhd8ed1ab_1 + - referencing=0.37.0=pyhcf101f3_0 + - requests=2.34.2=pyhcf101f3_0 + - rfc3339-validator=0.1.4=pyhd8ed1ab_1 + - rfc3986-validator=0.1.1=pyh9f0ad1d_0 + - rfc3987-syntax=1.1.0=pyhe01879c_1 + - rich=15.0.0=pyhcf101f3_0 + - roman-numerals=4.1.0=pyhd8ed1ab_0 + - rope=1.14.0=pyhd8ed1ab_0 + - rpds-py=2026.5.1=py312hd944d65_0 + - rtree=1.4.1=pyh11ca60a_0 + - ruff=0.15.17=h45713df_0 + - scipy=1.18.0=py312h9b3c559_0 + - seaborn=0.13.2=hd8ed1ab_3 + - seaborn-base=0.13.2=pyhd8ed1ab_3 + - send2trash=2.1.0=pyh6dadd2b_1 + - setuptools=82.0.1=pyh332efcf_0 + - sip=6.10.0=py312hbb81ca0_1 + - six=1.17.0=pyhe01879c_1 + - sniffio=1.3.1=pyhd8ed1ab_2 + - snowballstemmer=3.1.1=pyhd8ed1ab_0 + - sortedcontainers=2.4.0=pyhd8ed1ab_1 + - soupsieve=2.8.4=pyhd8ed1ab_0 + - sphinx=9.1.0=pyhd8ed1ab_0 + - sphinxcontrib-applehelp=2.0.0=pyhd8ed1ab_1 + - sphinxcontrib-devhelp=2.0.0=pyhd8ed1ab_1 + - sphinxcontrib-htmlhelp=2.1.0=pyhd8ed1ab_1 + - sphinxcontrib-jsmath=1.0.1=pyhd8ed1ab_1 + - sphinxcontrib-qthelp=2.0.0=pyhd8ed1ab_1 + - sphinxcontrib-serializinghtml=2.0.0=pyhd8ed1ab_0 + - spyder=6.1.4=hd8ed1ab_0 + - spyder-base=6.1.4=py312h2e8e312_0 + - spyder-kernels=3.1.4=win_pyh7428d3b_0 + - stack_data=0.6.3=pyhd8ed1ab_1 + - statsmodels=0.14.6=py312h196c9fc_0 + - superqt=0.8.0=pyh9208f05_0 + - sympy=1.14.0=pyh04b8f61_6 + - tbb=2023.0.0=hd3d4ead_2 + - terminado=0.18.1=pyh6dadd2b_1 + - text-unidecode=1.3=pyhd8ed1ab_2 + - textdistance=4.6.3=pyhd8ed1ab_1 + - three-merge=0.1.1=pyhd8ed1ab_1 + - tinycss2=1.5.1=pyhcf101f3_0 + - tk=8.6.13=h6ed50ae_3 + - toml=0.10.2=pyhcf101f3_3 + - tomli=2.4.1=pyhcf101f3_0 + - tomlkit=0.15.0=pyha770c72_0 + - tornado=6.5.7=py312he06e257_0 + - traitlets=5.15.1=pyhcf101f3_0 + - typing-extensions=4.15.0=h396c80c_0 + - typing_extensions=4.15.0=pyhcf101f3_0 + - typing_utils=0.1.0=pyhd8ed1ab_1 + - tzdata=2025c=hc9c84f9_1 + - ucrt=10.0.26100.0=h57928b3_0 + - ujson=5.13.0=py312ha1a9051_0 + - unicodedata2=17.0.1=py312he06e257_0 + - uri-template=1.3.0=pyhd8ed1ab_1 + - urllib3=2.7.0=pyhd8ed1ab_0 + - vc=14.5=h1b7c187_39 + - vc14_runtime=14.51.36231=h1b9f54f_39 + - vcomp14=14.51.36231=h1b9f54f_39 + - watchdog=6.0.0=py312h209ec74_3 + - wcwidth=0.8.1=pyhd8ed1ab_0 + - webcolors=25.10.0=pyhd8ed1ab_0 + - webencodings=0.5.1=pyhd8ed1ab_3 + - websocket-client=1.9.0=pyhd8ed1ab_0 + - whatthepatch=1.0.7=pyhd8ed1ab_1 + - wheel=0.47.0=pyhd8ed1ab_0 + - widgetsnbextension=4.0.15=pyhd8ed1ab_0 + - win_inet_pton=1.1.0=pyh7428d3b_8 + - winpty=0.4.3=4 + - wrapt=2.2.1=py312he06e257_0 + - xarray=2026.4.0=pyhc364b38_0 + - xorg-libxau=1.0.12=hba3369d_1 + - xorg-libxdmcp=1.1.5=hba3369d_1 + - xyzservices=2026.3.0=pyhd8ed1ab_0 + - yaml=0.2.5=h6a83c73_3 + - yapf=0.43.0=pyhd8ed1ab_1 + - yarl=1.24.2=py312h05f76fc_0 + - zeromq=4.3.5=h3a581c9_11 + - zipp=4.1.0=pyhcf101f3_0 + - zlib=1.3.2=hfd05255_2 + - zlib-ng=2.3.3=h0261ad2_1 + - zstd=1.5.7=h534d264_6 +prefix: C:\Users\tschan_d\AppData\Local\miniforge3\envs\MA diff --git a/get_doc.bat b/get_doc.bat new file mode 100644 index 0000000..725bcfa --- /dev/null +++ b/get_doc.bat @@ -0,0 +1,4 @@ +@echo off +echo Compiling documentation... +pdoc defs/ -o doc/ --html --force --config latex_math=True +pause \ No newline at end of file diff --git a/main.py b/main.py index fe3d528..461a12a 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,5 @@ # Imports -from defs.computing import OFRSample, OFRAnalyser +from defs.OFR import OFRSample, OFRAnalyser import numpy as np from pathlib import Path diff --git a/run/OFR_Analysis/202607023_OFR_Analysis_01.ipynb b/run/OFR_Analysis/202607023_OFR_Analysis_01.ipynb index cac766b..ac7fa0e 100644 --- a/run/OFR_Analysis/202607023_OFR_Analysis_01.ipynb +++ b/run/OFR_Analysis/202607023_OFR_Analysis_01.ipynb @@ -10,14 +10,14 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "8769766b", "metadata": {}, "outputs": [], "source": [ "# Imports\n", "\n", - "from defs.computing import OFRSample, OFRAnalyser\n", + "from defs.OFR import OFRSample, OFRAnalyser\n", "import numpy as np\n", "from pathlib import Path\n", "import matplotlib.pyplot as plt\n",