Analysis GUI for scanning SQUID microscopy datasets generated by the scanning-squid python package.
- Clone or download this repository.
- Edit the first line of
create_env.bat
,remove_env.bat
, andstart_gui.bat
to readcall <path\to\your\Anaconda3>\Scripts\activate.bat
. For most users this is probablyC:\Users\<your-user>\Anaconda3\Scripts\activate.bat
.- If you don't know where to find this, open the Anaconda Prompt and run
where python
. You should see something likeC:\Users\<your-user>\Anaconda3\python.exe
(see here). Then update the first line of the above .bat scripts withcall C:\Users\<your-user>\Anaconda3\Scripts\activate.bat
.
- If you don't know where to find this, open the Anaconda Prompt and run
- Double click
creat_env.bat
to create aconda env
calledscanning-squid-analysis
with all of the required packages. You only have to do this once, when you first install the program. You can close this cmd window once it readsPress any key to continue...
. - You can now start the data analysis GUI by double clicking
start_gui.bat
.
- Edit the second line of
create_env.command
andremove_env.command
to readsource <path/to/your>/anaconda3/bin/activate
. For most users this is probably/anaconda3/bin/activate
or~/anaconda3/bin/activate
. - Edit the second line of
start_gui.command
to readsource <path/to/your>/anaconda3/bin/activate scanning-squid-analysis
. - Open Terminal and navigate to this repository (
cd <path/to/this/repo>
orcd <space>
and drag/drop this directory into the Terminal window). - In Terminal, run
chmod u+x create_env.command remove_env.command start_gui.command
to give the terminal permission to run these files. - Double click
create_env.command
to create aconda env
calledscanning-squid-analysis
with all of the required packages. You only have to do this once, when you first install the program. You can close this Terminal window once it reads[Process completed]
. - You can now start the data analysis GUI by double clicking
start_gui.command
.
- Use the Select directory button, File -> Select directory..., or ctrl+O (Windows)/cmd+O (Mac) to select the data directory. This base directory (for example
sample_data/data
in this repo) should contain dated subdirectories, which in turn contain single datasets (e.g.sample_data/data/2018-09-14/#016_scan_13-07-41
). - Click a specific dataset in the DataSet Browser to load its data. The dataset metadata and instrument settings can be examined with the Measurement Metadata and Microscope Snapshot widgets.
- The arrays contained in the dataset can be visualized/lightly processed in the DataSet Plotter.
- The current matplotlib figure can be exported using Plot -> Export matplotlib... or ctrl+P (Windows)/cmd+P (Mac).
- The currently displayed data (including any rotations, background subtraction, cross-sections, etc.) can be exported using File -> Export current data... or ctrl+S (Windows)/cmd+S (Mac). The available export formats are:
- MATLAB .mat file: Each array is saved to a struct with field names 'array' and 'unit'.
- HDF5 .h5 file: Can be read by h5py, MATLAB, or viewed with HDF5 View.
- Python pickle: A dictionary of arrays is written directly to a file in binary form and can be loaded using:
import pickle with open('filename.pickle', 'rb') as f: arrays = pickle.load(f)
- The built-in IPython console has access to the following:
- matplotlib.pyplot:
plt
- numpy:
np
- a dict of the current arrays in the form of pint
Quantities
:arrays
. For example,arrays['MAG'].magnitude
will be theMAG
array, with unitsarrays['MAG'].units
- the current
qcodes.data.data_set.DataSet
:dataset
- matplotlib.pyplot:
- If you wish to uninstall the program, double click
remove_env.bat
(Windows) orremove_env.command
(Mac) to remove thescanning-squid-analysis
conda env
, then delete this repository. - If you find bugs/have suggestions for new features, please use the GitHub Issues feature.
- Contact: logan.bvh@gmail.com.
- Logo by Tom Shahar.