* A tour of the many functions in hdf_utils and io_utils since these functions need data to show / explain them.
* pycroscopy pacakge organization - a short writeup on what is where and differences between the process / analyis submodules
* How to write your own analysis class based on the (to-be simplified) Model class
Rama's (older and more applied / specific) tutorial goals
~~~~~~~~~~~~~~~~~~~~
1. Open a translated and fitted FORC-PFM file, and plot the SHO Fit from cycle k corresponding to voltage p, along with the raw spectrogram for that location and the SHO guess. Plot both real and imaginary, and do so for both on and off-field.
2. Continuing above, determine the average of the quality factor coming from cycles 1,3,4 for spatial points stored in vector b for the on-field part for a predetermined voltage range given by endpoints [e,f]. Compare the results with the SHO guess and fit for the quality factor.
3. After opening a h5 file containing results from a relaxation experiment, plot the response at a particular point and voltage, run exponential fitting and then store the results of the fit in the same h5 file using iohdf and/or numpy translators.
4. Take a FORC IV ESM dataset and break it up into forward and reverse branches, along with positive and negative branches. Do correlation analysis between PFM and IV for different branches and store the results in the file, and readily access them for plotting again.
5. A guide to using the model fitter for parallel fitting of numpy array-style datasets. This one can be merged with number
New features
------------
Core development
~~~~~~~~~~~~~~~~
* Finish PycroDataset and test the many data slicing, referencing operations on **main** datasets.
* Need to be able to run a visualizer even on sliced data. What would this object be? (sliced Main data + vectors for each axis + axis labels ....). Perhaps the slice() function should return this object instead of a numpy array? As it stands, the additional information (for the visualizer) is not returned by the slice function.
* Consider implementing doSVD as a Process. Maybe the Decomposition and Cluster classes could extend Process?
* Simplify and demystify analyis / optimize. Use parallel_compute instead of optimize and gues_methods and fit_methods
* multi-node computing capability in parallel_compute
* Data Generators
GUI
~~~~~~~~~~~
* Need to be able to run a visualizer even on sliced data. What would this object be? (sliced Main data + vectors for each axis + axis labels ....). Perhaps the slice() function should return this object instead of a numpy array? As it stands, the additional information (for the visualizer) is not returned by the slice function.
* Generic visualizer in plot.lly / dash? that can use the PycroDataset class
* One suggestion is 2 (or more panes).
* Left hand side for positions
...
...
@@ -21,35 +53,11 @@ Core development
* Right hand side for spectral
* 1D spectra or 2D images.
* Users will be asked to slice N-1 or N-2 spectral dimensions
* Rewrite fft filtering as a Process class.
* Simplify and demystify analyis / optimize. Use parallel_compute instead of optimize and gues_methods and fit_methods
* multi-node computing capability in parallel_compute
* Data Generators
External user contributions
~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Li Xin classification code
* Ondrej Dyck’s atom finding code – written but needs work before fully integrated
* Nina Wisinger’s processing code (Tselev) – in progress
* Sabine Neumeyer's cKPFM code
* Iaroslav Gaponenko's Distort correct code from - https://github.com/paruch-group/distortcorrect.
* Port everything from IFIM Matlab -> Python translation exercises
* Other workflows/functions that already exist as scripts or notebooks
GUI
----
* Switch to using plot.ly and dash for interactive elements
* Possibly use MayaVi for 3d plotting
Plot Utils
----------
* Define default font sizes that will be adopted in all functions wherever applicable using rcParams. See - https://matplotlib.org/users/customizing.html
* label_fontsize=16
* tick_fontsize=14
* title_fontsize=18
* Override wherever necessary.
~~~~~~~~~
* _add_loop_parameters - is BE specific and should be moved out of plot_utils
* rainbow_plot -
...
...
@@ -134,39 +142,17 @@ Plot Utils
3. Don’t allow specification of figure_path here. Save elsewhere
* plot_histograms - not used frequently. Can be ignored for this pass
Examples / Tutorials
--------------------
Short tutorials on how to use pycroscopy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Access h5 files
* Find a specific dataset/group in the file
* Select data within a dataset in various ways
* micro datasets / microdata groups
* chunking the main dataset
* Links to tutorials on how to use pycharm, Git,
Longer examples (via specific scientific usecases)
* How to write your write your own parallel computing function using the process module - add more documentation
* A tour of the many functions in hdf_utils and io_utils since these functions need data to show / explain them.
* How to write your own analysis class based on the (to-be simplified) Model class
* pycroscopy pacakge organization - a short writeup on what is where and differences between the process / analyis submodules
Rama's (older and more applied / specific) tutorial goals
~~~~~~~~~~~~~~~~~~~~
1. Open a translated and fitted FORC-PFM file, and plot the SHO Fit from cycle k corresponding to voltage p, along with the raw spectrogram for that location and the SHO guess. Plot both real and imaginary, and do so for both on and off-field.
2. Continuing above, determine the average of the quality factor coming from cycles 1,3,4 for spatial points stored in vector b for the on-field part for a predetermined voltage range given by endpoints [e,f]. Compare the results with the SHO guess and fit for the quality factor.
3. Done - After opening a h5 file containing results from a relaxation experiment, plot the response at a particular point and voltage, run exponential fitting and then store the results of the fit in the same h5 file using iohdf and/or numpy translators.
4. Take a FORC IV ESM dataset and break it up into forward and reverse branches, along with positive and negative branches. Do correlation analysis between PFM and IV for different branches and store the results in the file, and readily access them for plotting again.
5. A guide to using the model fitter for parallel fitting of numpy array-style datasets. This one can be merged with number
Documentation
-------------
* Switch from static examples to dynamic jupyter notebook like examples:
* Work will be needed after examples are done
* Include examples in documentation
* Links to references for all functions and methods used in our workflows.
External user contributions
~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Li Xin classification code
* Ondrej Dyck’s atom finding code – written but needs work before fully integrated
* Nina Wisinger’s processing code (Tselev) – in progress
* Sabine Neumeyer's cKPFM code
* Iaroslav Gaponenko's Distort correct code from - https://github.com/paruch-group/distortcorrect.
* Port everything from IFIM Matlab -> Python translation exercises
* Other workflows/functions that already exist as scripts or notebooks
Convert the source image file into a pycroscopy compatible hierarchical data format (HDF or .h5) file. This simple translation gives you access to the powerful data functions within pycroscopy
#### H5 files:
* are like smart containers that can store matrices with data, folders to organize these datasets, images, metadata like experimental parameters, links or shortcuts to datasets, etc.
* are readily compatible with high-performance computing facilities
* scale very efficiently from few kilobytes to several terabytes
* can be read and modified using any language including Python, Matlab, C/C++, Java, Fortran, Igor Pro, etc.
%% Cell type:code id: tags:
``` python
# Check if an HDF5 file with the chosen image already exists.
print('HDF5 file with Raw_Data found. No need to translate.')
exceptKeyError:
print('Raw Data not found.')
else:
print('No HDF5 file found.')
ifneed_translation:
# Initialize the Image Translator
tl=px.ImageTranslator()
# create an H5 file that has the image information in it and get the reference to the dataset
h5_raw=tl.translate(image_path)
# create a reference to the file
h5_file=h5_raw.file
print('HDF5 file is located at {}.'.format(h5_file.filename))
```
%% Cell type:markdown id: tags:
### Inspect the contents of this h5 data file
The file contents are stored in a tree structure, just like files on a contemporary computer.
The data is stored as a 2D matrix (position, spectroscopic value) regardless of the dimensionality of the data.
In the case of these 2D images, the data is stored as a N x 1 dataset
The main dataset is always accompanied by four ancillary datasets that explain the position and spectroscopic value of any given element in the dataset.
In the case of the 2d images, the positions will be arranged as row0-col0, row0-col1.... row0-colN, row1-col0....
The spectroscopic information is trivial since the data at any given pixel is just a scalar value