imports#

class ImportBase[source]#

Bases: abc.ABC

An overarching class that controls the rest of the processing pipeline. Holds Uploader instances, which can be used for uploading data in the form of Projections instances. The prenorm_uploader is general, in that it can be used for any type of data. This is why it is in the base class. The subclasses of ImportBase are for creating and holding raw Uploader instances.

enable_prenorm(*args)[source]#

Makes the prenorm_uploader projections the projections used throughout the app. Refreshes plots in the other tabs to match these.

enable_raw(*args)[source]#

Makes the raw_uploader projections the projections used throughout the app. Refreshes plots in the other tabs to match these.

abstract make_tab()[source]#
class Import_ALS832[source]#

Bases: tomopyui.widgets.imports.ImportBase

make_tab()[source]#
class Import_APS[source]#

Bases: tomopyui.widgets.imports.Import_ALS832

class Import_SSRL62B[source]#

Bases: tomopyui.widgets.imports.ImportBase

make_tab()[source]#
class Import_SSRL62C[source]#

Bases: tomopyui.widgets.imports.ImportBase

make_tab()[source]#
class PrenormUploader(Import)[source]#

Bases: tomopyui.widgets.imports.UploaderBase

check_for_images()[source]#
create_and_display_metadata_tables()[source]#

Creates metadata dataframe and displays it in self.metadata_table_output.

create_app()[source]#
create_metadata_callback(name, widget)[source]#

Callback for setting metadata. Creates metadata table and displays it if all required metadata are in self.projections.metadata.metadata

enter_metadata_output()[source]#

Enables/disables widgets if they are not/are already in the metadata. Displays the box if any of the widgets are not disabled.

extract_image_sizes(image_list)[source]#
images_in_dir_callback(change, from_select=True)[source]#

Callback for the image selection widget. Displays updated metadata table with image pixel sizes if you select a tiff or npy.

Parameters
from_select: bool

If this is false, ind will be the current selected index. Needed for calling back from self.tiff_folder_on.

import_data()[source]#

Function that calls on io.py (projections) to run import. The function chosen will depend on whether one is uploading a folder, or a

reset_required_widgets()[source]#

Resets metadata widgets to default values. This also sets the metadata dict values (widget.value = val triggers metadata setting callbacks)

tiff_folder_on(change)[source]#

Turns on the tiff folder option, where it will try to load all the tiffs in the folder (a tiff sequence). Some redundancies

update_filechooser_from_quicksearch(json_files)[source]#
class RawUploader_ALS832(Import)[source]#

Bases: tomopyui.widgets.imports.UploaderBase

Raw uploaders are the way you get your raw data (projections, flats, dark fields) into TomoPyUI. It holds a ProjectionsBase subclass (see io.py) that will do all of the data import stuff. the ProjectionsBase subclass for SSRL is RawProjectionsXRM_SSRL62. For you, it could be named RawProjectionsHDF5_APSyourbeamlinenumber().

create_app()[source]#
import_data()[source]#

This is what is called when you click the blue import button on the frontend.

update_filechooser_from_quicksearch(h5files)[source]#

This is what is called when you update the quick path search bar. Right now, this is very basic. If you want to see a more complex version of this you can look at the example in PrenormUploader.

This is called after _update_filechooser_from_quicksearch in UploaderBase.

class RawUploader_APS(Import)[source]#

Bases: tomopyui.widgets.imports.RawUploader_ALS832

See descriptions in RawUploader_ALS832 superclass. You shouldn’t have to do much here other than changing self.projections and self.reset_metadata_to if you change those names. # Francesco: edit here, if needed.

class RawUploader_SSRL62B(Import)[source]#

Bases: tomopyui.widgets.imports.UploaderBase

This uploader has two slots for choosing files and uploading: one for references, one for projections. This is because our data is stored in two separate folders.

create_app()[source]#
enable_import()[source]#
import_data(*args)[source]#
update_filechooser_from_quicksearch(textfiles)[source]#
class RawUploader_SSRL62C(Import)[source]#

Bases: tomopyui.widgets.imports.UploaderBase

check_energy_folders()[source]#
create_app()[source]#
energy_overwrite(*args)[source]#
import_data()[source]#
update_filechooser_from_quicksearch(textfiles)[source]#
class ShiftsUploader(Prep)[source]#

Bases: tomopyui.widgets.imports.UploaderBase

import_data(change)[source]#
import_shifts_from_metadata()[source]#
import_shifts_from_npy()[source]#
update_filechooser_from_quicksearch(shifts_files)[source]#
update_shift_lists()[source]#
class TwoEnergyUploader(viewer)[source]#

Bases: tomopyui.widgets.imports.PrenormUploader

import_data()[source]#

Function that calls on io.py (projections) to run import. The function chosen will depend on whether one is uploading a folder, or a

class UploaderBase[source]#

Bases: abc.ABC

check_filepath_exists(path)[source]#
abstract import_data()[source]#
abstract update_filechooser_from_quicksearch(change)[source]#