Molass Library Reference#
Molass Library is a rewrite of MOLASS, a tool for the analysis of SEC-SAXS experiment data currently hosted at Photon Factory and SPring-8, Japan.
This document describes each function of the library.
For more structural information, see also:
Tutorial: https://biosaxs-dev.github.io/molass-tutorial on practical usage, for beginners
Essence: https://biosaxs-dev.github.io/molass-essence on theory, for researchers
Technical Report: https://biosaxs-dev.github.io/molass-technical/ on technical details, for advanced users
Legacy Reference: https://biosaxs-dev.github.io/molass-legacy/ for function reference of the GUI application version, the predecessor.
To join the community, see also:
Handbook: https://biosaxs-dev.github.io/molass-develop on maintenance, for developers.
Module Functions#
- to_int_tuple(version_string)#
Convert a version string to a tuple of integers for comparison.
- Parameters:
version_string (str) – A version string in the format ‘major.minor.patch’.
- Returns:
tuple
- Return type:
A tuple of integers representing the version.
- class Version(version_string)#
Bases:
object
A class to represent and compare software version strings.
- get_version(toml_only=False)#
Retrieve the version of the package from pyproject.toml or importlib.metadata.
This function prioritizes reading the version from pyproject.toml to ensure that the local repository version is used during development or testing. If pyproject.toml is not found, it falls back to using importlib.metadata to retrieve the version of the installed package.
- Parameters:
toml_only (bool, optional) –
If True, the function strictly reads the version from pyproject.toml. This is crucial to avoid confusion about the version being used, which can lead to significant time loss during testing. (confusion about the local repository versus the installed).
If False, the function attempts to read the version from pyproject.toml first. If pyproject.toml does not exist, which means you are using the installed package, it falls back to using importlib.metadata to retrieve this version.
- Returns:
An instance of the Version class representing the package version.
- Return type:
- Raises:
AssertionError: – If toml_only is True but pyproject.toml is not found. This ensures that the function behaves predictably in cases where the local repository is not available.
This docstring was improved in collaboration with GitHub Copilot. –
Submodules#
- Baseline
- Bridge
- DataObjects
- Submodules
- DataObjects.Curve
Curve
Curve.x
Curve.y
Curve.type
Curve.max_i
Curve.max_x
Curve.max_y
Curve.peaks
Curve.moment
Curve.spline
Curve.diff_spline
Curve.get_xy()
Curve.set_max()
Curve.get_max_i()
Curve.get_max_y()
Curve.get_max_x()
Curve.get_max_xy()
Curve.get_peaks()
Curve.get_num_major_peaks()
Curve.get_moment()
Curve.smooth_copy()
Curve.get_spline()
Curve.get_diff_spline()
Curve.corrected_copy()
create_icurve()
create_jcurve()
- DataObjects.SecSaxsData
SecSaxsData
SecSaxsData.xr
SecSaxsData.uv
SecSaxsData.trimmed
SecSaxsData.mapping
SecSaxsData.beamline_info
SecSaxsData.time_initialized
SecSaxsData.time_required
SecSaxsData.time_required_total
SecSaxsData.datafiles
SecSaxsData.logger
SecSaxsData.plot_3d()
SecSaxsData.plot_compact()
SecSaxsData.make_trimming()
SecSaxsData.plot_trimming()
SecSaxsData.copy()
SecSaxsData.trimmed_copy()
SecSaxsData.set_baseline_method()
SecSaxsData.get_baseline_method()
SecSaxsData.corrected_copy()
SecSaxsData.estimate_mapping()
SecSaxsData.get_mapping()
SecSaxsData.get_concfactor()
SecSaxsData.quick_decomposition()
SecSaxsData.inspect_ip_effect()
SecSaxsData.get_uv_device_id()
SecSaxsData.get_beamline_name()
SecSaxsData.export()
SecSaxsData.plot_varied_decompositions()
- DataObjects.SsMatrixData
SsMatrixData
SsMatrixData.iv
SsMatrixData.jv
SsMatrixData.M
SsMatrixData.E
SsMatrixData.moment
SsMatrixData.baseline_method
SsMatrixData.copy()
SsMatrixData.get_icurve()
SsMatrixData.get_jcurve()
SsMatrixData.get_moment()
SsMatrixData.set_baseline_method()
SsMatrixData.get_baseline_method()
SsMatrixData.get_baseline2d()
- DataObjects.UvData
- DataObjects.XrData
- DataObjects.Curve
- Submodules
- DataUtils
- Decompose
- DensitySpace
- Except
- FlowChange
- Global
- Guinier
- InterParticle
- Legacy
- Local
- LowRank
- Submodules
- LowRank.Component
Component
Component.icurve_array
Component.jcurve_array
Component.ccurve
Component.peak_index
Component.icurve
Component.jcurve
Component.area
Component.ccurve
Component.get_icurve()
Component.get_jcurve()
Component.get_jcurve_array()
Component.compute_area()
Component.compute_range()
Component.make_paired_range()
XrComponent
UvComponent
- LowRank.ComponentCurve
- LowRank.ConsistentAdjuster
- LowRank.CoupledAdjuster
- LowRank.CurveDecomposer
- LowRank.Decomposition
Decomposition
Decomposition.ssd
Decomposition.xr
Decomposition.xr_icurve
Decomposition.xr_ccurves
Decomposition.xr_ranks
Decomposition.uv
Decomposition.uv_icurve
Decomposition.uv_ccurves
Decomposition.uv_ranks
Decomposition.mapping
Decomposition.mapped_curve
Decomposition.paired_ranges
Decomposition.num_components
Decomposition.copy_with_new_components()
Decomposition.get_num_components()
Decomposition.plot_components()
Decomposition.update_xr_ranks()
Decomposition.get_xr_matrices()
Decomposition.get_xr_components()
Decomposition.get_guinier_objects()
Decomposition.get_rgs()
Decomposition.get_uv_matrices()
Decomposition.get_uv_components()
Decomposition.get_pairedranges()
Decomposition.get_proportions()
Decomposition.compute_scds()
Decomposition.get_cd_color_info()
Decomposition.optimize_with_model()
- LowRank.ErrorPropagate
- LowRank.LowRankInfo
- LowRank.PairedRange
- LowRank.PositionedDecomposer
- LowRank.ProportionalDecomposer
- LowRank.QuickImplement
- LowRank.Component
- Submodules
- Mapping
- PackageUtils
- Peaks
- PlotUtils
- Submodules
- Progress
- Reports
- Submodules
- Reports.Controller
Controller
Controller.env_info
Controller.ssd
Controller.preproc
Controller.kwargs
Controller.logger
Controller.work_folder
Controller.bookpath
Controller.excel_is_available
Controller.excel_version
Controller.atsas_is_available
Controller.more_multicore
Controller.conc_tracker
Controller.temp_folder
Controller.result_wb
Controller.teller
Controller.excel_client
Controller.prepare_averaged_data()
Controller.make_temp_folder()
Controller.stop()
Controller.stop_check()
Controller.cleanup()
Controller.error_cleanup()
- Reports.Migrating
- Reports.ReportRange
- Reports.V1GuinierReport
- Reports.V1LrfReport
- Reports.V1Report
- Reports.V1SummaryReport
- Reports.Controller
- Submodules
- SAXS
- SAXS.Models
- ScipyUtils
- SEC
- Submodules
- Submodules
- SEC.ColumnElements
SolidGrain
SolidGrain.id_
SolidGrain.center
SolidGrain.radius
SolidGrain.poreradius
SolidGrain.poredist
SolidGrain.entries
SolidGrain.compute_poreentries()
SolidGrain.draw_entries()
SolidGrain.draw()
SolidGrain.get_point_from_angle()
SolidGrain.get_entry_including()
SolidGrain.compute_bounce_vector()
SolidGrain.compute_inpore_nextpos()
Particle
NewGrain
new_grain_unit_test()
grain_particle_test()
draw_wedges()
- SEC.ColumnSimulation
- SEC.ColumnSliceStates
- SEC.ColumnStructure
- SEC.ModelFactory
- SEC.StationaryMove
- SEC.ColumnElements
- SEC.Models
- Shapes
- Stats
- SurveyUtils
- Testing
- Trimming