crtomo.notebook package

Submodules

crtomo.notebook.nb module

class crtomo.notebook.nb.base_step(persistent_directory=None)[source]

Bases: object

apply_next_input()[source]

Actually execute the step based in self.input_new

can_run()[source]

Check if all required steps have been finished

create_ipywidget_gui()[source]
find_previous_step(starting_step, search_name)[source]
persistency_load()[source]

Load state of this step from peristency directory

persistency_store()[source]

Store the current state of the widget in the given persistency directory

set_input_new(input_new)[source]

Apply a new set of inputs

TODO: This is the place to check the input_new dictionary for consistency with self.input_skel

transfer_input_new_to_applied()[source]

Make a copy of the self.input_new dict and store in self.input_applied

This is complicated because some objects cannot be easily copied (e.g., io.BytesIO). Therefore, each step must implement this function by itself.

class crtomo.notebook.nb.crtomo_gui_jupyter[source]

Bases: object

prepare_inv(button)[source]

Load mesh and data, and then show the inversion settings

prepare_widgets()[source]
run_inv(button)[source]
show()[source]
crtomo.notebook.nb.do_we_run_in_ipython()[source]
class crtomo.notebook.nb.processing_workflow_v1(persistent_directory=None, prepare_gui=True)[source]

Bases: object

Provide one workflow for processing, inversion, and visualization of CR data.

Input is provided only by dictionaries (or, optional, via json strings).

Please note that this workflow represents only one specific way of handling complex-resistivity data. Other workflows may be more appropriate for specific applications.

# Executing the workflow

As a first rule of thumb, each step can only be executed once the previous one is finished. There may be exceptions when it comes to plotting/analysing inversion results.

# Steps of the workflow:

  • step 1: Data import:

  • step 2: Raw data visualisation

    step_raw_visualisation = {

    ‘plot_histograms’: True, ‘plot_pseudosections’: True, // default: type 1 ‘pseudosection_type’: int(1),

    }

__init__(persistent_directory=None, prepare_gui=True)[source]
Parameters:

persistent_directory (None|str) – If given, store input data and, if possible, intermediate results, in a persistent directory. Data is then loaded from this directory during the next initialisation

_set_help_page(page)[source]
callback_step_ran(step)[source]

This function is called from within a given step when this step applied new settings (i.e., it runs)

Do the following:
  • invalidate all steps further down

prepare_jupyter_gui()[source]
print_step_tree()[source]
show_gui()[source]
update_help_page(changee)[source]
class crtomo.notebook.nb.step_data_import(persistent_directory=None)[source]

Bases: base_step

apply_next_input()[source]
apply_next_input_from_gui(button)[source]

Generate an input dict from the gui elements and apply those new inputs

can_run()

Check if all required steps have been finished

create_ipywidget_gui()[source]
find_previous_step(starting_step, search_name)
persistency_load()[source]

Load state of this step from peristency directory

persistency_store()[source]

Store the current state of the widget in the given persistency directory

set_input_new(input_new)

Apply a new set of inputs

TODO: This is the place to check the input_new dictionary for consistency with self.input_skel

transfer_input_new_to_applied()[source]

Make a copy of the self.input_new dict and store in self.input_applied

This is complicated because some objects cannot be easily copied (e.g., io.BytesIO). Therefore, each step must implement this function by itself.

class crtomo.notebook.nb.step_fe_mesh(persistent_directory=None)[source]

Bases: base_step

Load, or generate, an FE mesh for CRTomo

apply_next_input()[source]
apply_next_input_from_gui(button)[source]

Generate an input dict from the gui elements and apply those new inputs

can_run()

Check if all required steps have been finished

create_ipywidget_gui()[source]
find_previous_step(starting_step, search_name)
persistency_load()

Load state of this step from peristency directory

persistency_store()

Store the current state of the widget in the given persistency directory

set_input_new(input_new)

Apply a new set of inputs

TODO: This is the place to check the input_new dictionary for consistency with self.input_skel

transfer_input_new_to_applied()

Make a copy of the self.input_new dict and store in self.input_applied

This is complicated because some objects cannot be easily copied (e.g., io.BytesIO). Therefore, each step must implement this function by itself.

class crtomo.notebook.nb.step_inversion_analysis(persistent_directory=None)[source]

Bases: base_step

apply_next_input()[source]
apply_next_input_from_gui(button)[source]

Generate an input dict from the gui elements and apply those new inputs

can_run()

Check if all required steps have been finished

create_ipywidget_gui()[source]
find_previous_step(starting_step, search_name)
persistency_load()

Load state of this step from peristency directory

persistency_store()

Store the current state of the widget in the given persistency directory

set_input_new(input_new)

Apply a new set of inputs

TODO: This is the place to check the input_new dictionary for consistency with self.input_skel

transfer_input_new_to_applied()

Make a copy of the self.input_new dict and store in self.input_applied

This is complicated because some objects cannot be easily copied (e.g., io.BytesIO). Therefore, each step must implement this function by itself.

class crtomo.notebook.nb.step_inversion_settings(persistent_directory=None)[source]

Bases: base_step

apply_next_input()[source]
apply_next_input_from_gui(button)[source]

Generate an input dict from the gui elements and apply those new inputs

can_run()

Check if all required steps have been finished

create_ipywidget_gui()[source]
find_previous_step(starting_step, search_name)
persistency_load()

Load state of this step from peristency directory

persistency_store()

Store the current state of the widget in the given persistency directory

set_input_new(input_new)

Apply a new set of inputs

TODO: This is the place to check the input_new dictionary for consistency with self.input_skel

transfer_input_new_to_applied()

Make a copy of the self.input_new dict and store in self.input_applied

This is complicated because some objects cannot be easily copied (e.g., io.BytesIO). Therefore, each step must implement this function by itself.

class crtomo.notebook.nb.step_raw_visualization(persistent_directory=None)[source]

Bases: base_step

apply_next_input()[source]
apply_next_input_from_gui(button)[source]

Generate an input dict from the gui elements and apply those new inputs

can_run()

Check if all required steps have been finished

create_ipywidget_gui()[source]
find_previous_step(starting_step, search_name)
persistency_load()

Load state of this step from peristency directory

persistency_store()

Store the current state of the widget in the given persistency directory

set_input_new(input_new)

Apply a new set of inputs

TODO: This is the place to check the input_new dictionary for consistency with self.input_skel

transfer_input_new_to_applied()

Make a copy of the self.input_new dict and store in self.input_applied

This is complicated because some objects cannot be easily copied (e.g., io.BytesIO). Therefore, each step must implement this function by itself.

Module contents