Extract Physical Values#
Generate and store the best fit values and metadata for an experiment.
Quick Start#
Once the Fourier terms have been calculated by process_images.py
this script fits
the data to the experimental spectrum and creates a fitting_vals.csv
table for the
experiment directory. After this use create_plots.py
to merge the results from
several experiments and create summaries of the data.
Outline#
For each Fourier terms file we fit every granule to a given theoretical spectrum. From this we calculate the best estimates for the physical values, typically the surface tension and bending rigidity.
This is saved in a summary table, with other metadata about the granules, this includes properties of the granule such as its size or the time since treatment, but also abstract parameters, such as the quality of fitting to the expected spectrum.
Once the summary table is created, we add a number of secondary columns for convenience, typically physical values re-scaled by some factor or on a log scale. We also bin the time values into 5 minute intervals that can be used for aggregation/averaging.
As the fitting is somewhat expensive, we provide an option for reusing the
summary table . This can be cleared by using the --clear
flag, and new data
will be generated.
Merge Caches#
Once we have gathered all of the data in an experiment directory, we can then analyse
these files together using the merge_caches
function. We provide means for dealing
with mismatched or missing columns.
Simply provide a list of Path
objects pointing to the fittingVals.csv
files to
merge.
Flags#
--all-frames
Do not remove frames that have failed the boundary check when fitting for a granule. The pass rate is still recorded with the granule and may be used to filter the entire granule from later analysis.
-j
,--processes
1Number of cores to run the fittings on; with each core running a different time series. Defaults to single core for debugging, but multiple cores are recommended.
--clear
Recreate the
fittingVals.csv
file.
- flickerprint.workflow.extract_physical_values.main(working_dir: Path, plotting=False, cores=1)#
Merge multiple Fourier terms into a single file.
- flickerprint.workflow.extract_physical_values.process_fourier_file(input_path: Path, output: Path, plotting=True)#
Perform spectrum fitting on one h5 file.