Changes
On August 4, 2023 at 8:52:03 AM UTC, admin:
-
No fields were updated. See the metadata diff for more details.
f | 1 | { | f | 1 | { |
2 | "author": "Seiberlich, Mervin", | 2 | "author": "Seiberlich, Mervin", | ||
3 | "author_email": "", | 3 | "author_email": "", | ||
4 | "creator_user_id": "17755db4-395a-4b3b-ac09-e8e3484ca700", | 4 | "creator_user_id": "17755db4-395a-4b3b-ac09-e8e3484ca700", | ||
5 | "doi": "10.35097/1426", | 5 | "doi": "10.35097/1426", | ||
6 | "doi_date_published": "2023", | 6 | "doi_date_published": "2023", | ||
7 | "doi_publisher": "", | 7 | "doi_publisher": "", | ||
8 | "doi_status": "True", | 8 | "doi_status": "True", | ||
9 | "groups": [], | 9 | "groups": [], | ||
10 | "id": "1b27d5ca-32cc-4ccc-b294-d9807445f709", | 10 | "id": "1b27d5ca-32cc-4ccc-b294-d9807445f709", | ||
11 | "isopen": false, | 11 | "isopen": false, | ||
12 | "license_id": "Other", | 12 | "license_id": "Other", | ||
13 | "license_title": "Other", | 13 | "license_title": "Other", | ||
14 | "metadata_created": "2023-08-04T08:50:46.096837", | 14 | "metadata_created": "2023-08-04T08:50:46.096837", | ||
t | 15 | "metadata_modified": "2023-08-04T08:50:46.096843", | t | 15 | "metadata_modified": "2023-08-04T08:52:03.346354", |
16 | "name": "rdr-doi-10-35097-1426", | 16 | "name": "rdr-doi-10-35097-1426", | ||
17 | "notes": "Abstract: Python module for the evaluation of lab | 17 | "notes": "Abstract: Python module for the evaluation of lab | ||
18 | experiments.\r\n\r\nThe module implements functions to import | 18 | experiments.\r\n\r\nThe module implements functions to import | ||
19 | meta-data of measurements, filters to search for subsets of them and | 19 | meta-data of measurements, filters to search for subsets of them and | ||
20 | routines to import and plot data from this meta-data. It works well in | 20 | routines to import and plot data from this meta-data. It works well in | ||
21 | its original context but is currently in open alpha since it will be | 21 | its original context but is currently in open alpha since it will be | ||
22 | restructured in order to be compatible with new lab | 22 | restructured in order to be compatible with new lab | ||
23 | environments.\r\nTechnicalRemarks: # \ud83d\udd2c\ufe0f Experiment | 23 | environments.\r\nTechnicalRemarks: # \ud83d\udd2c\ufe0f Experiment | ||
24 | Evaluation\r\nPython module for the evaluation of lab | 24 | Evaluation\r\nPython module for the evaluation of lab | ||
25 | experiments.\r\n\r\nThe module implements functions to import | 25 | experiments.\r\n\r\nThe module implements functions to import | ||
26 | meta-data of measurements, filters to search for subsets of them and | 26 | meta-data of measurements, filters to search for subsets of them and | ||
27 | routines to import and plot data from this meta-data. It works well in | 27 | routines to import and plot data from this meta-data. It works well in | ||
28 | its original context but is currently in open alpha since it will be | 28 | its original context but is currently in open alpha since it will be | ||
29 | restructured in order to be compatible with new lab | 29 | restructured in order to be compatible with new lab | ||
30 | environments.\r\n\r\nExamples of its usage in scientific works will | 30 | environments.\r\n\r\nExamples of its usage in scientific works will | ||
31 | soon be published by the author that can be used to reference it. Feel | 31 | soon be published by the author that can be used to reference it. Feel | ||
32 | free to use it for your own projects and to ask questions. For now you | 32 | free to use it for your own projects and to ask questions. For now you | ||
33 | can cite this repository as source.\r\n\r\n# \ud83d\udcbb\ufe0f | 33 | can cite this repository as source.\r\n\r\n# \ud83d\udcbb\ufe0f | ||
34 | Installation\r\nYou need a running python3 installation on your OS. | 34 | Installation\r\nYou need a running python3 installation on your OS. | ||
35 | The module was written on Debian/GNU-Linux, was tested on Windows and | 35 | The module was written on Debian/GNU-Linux, was tested on Windows and | ||
36 | should also run on other OS.\r\nIt is recommended to work in an | 36 | should also run on other OS.\r\nIt is recommended to work in an | ||
37 | virtual environment (see the official python documentation -> from | 37 | virtual environment (see the official python documentation -> from | ||
38 | bash: `python3 -m venv exp_env` `source exp_env/bin/activate`) or | 38 | bash: `python3 -m venv exp_env` `source exp_env/bin/activate`) or | ||
39 | conda installation.\r\n\r\n## Dependencies\r\nDependencies are the | 39 | conda installation.\r\n\r\n## Dependencies\r\nDependencies are the | ||
40 | usual scientific modules like numpy, matplotlib, pandas but also | 40 | usual scientific modules like numpy, matplotlib, pandas but also | ||
41 | astropy. See the `requirements.txt` from that you should be able to | 41 | astropy. See the `requirements.txt` from that you should be able to | ||
42 | install the library with\r\n\r\n```\r\npip install pip -U # Update pip | 42 | install the library with\r\n\r\n```\r\npip install pip -U # Update pip | ||
43 | itself\r\npip install -r | 43 | itself\r\npip install -r | ||
44 | /path/to/requirements.txt\r\n```\r\n\r\nAlternatively you can also | 44 | /path/to/requirements.txt\r\n```\r\n\r\nAlternatively you can also | ||
45 | install the required modules from the shell etc.. The author | 45 | install the required modules from the shell etc.. The author | ||
46 | recommends to also install jupyter that includes the interactive | 46 | recommends to also install jupyter that includes the interactive | ||
47 | ipython:\r\n\r\n```\r\n# Example via pip\r\npip install | 47 | ipython:\r\n\r\n```\r\n# Example via pip\r\npip install | ||
48 | jupyter\r\n\r\npip install numpy\r\npip install matplotlib\r\npip | 48 | jupyter\r\n\r\npip install numpy\r\npip install matplotlib\r\npip | ||
49 | install scipy\r\npip install pandas\r\npip install astropy\r\npip | 49 | install scipy\r\npip install pandas\r\npip install astropy\r\npip | ||
50 | install mplcursors\r\npip install pynufft\r\n# pip install | 50 | install mplcursors\r\npip install pynufft\r\n# pip install | ||
51 | python-slugify # make sure this version of slugify is installed and | 51 | python-slugify # make sure this version of slugify is installed and | ||
52 | not 'slugify'\r\n```\r\n\r\n## The module itself\r\nInside your | 52 | not 'slugify'\r\n```\r\n\r\n## The module itself\r\nInside your | ||
53 | virtual environment there is a folder | 53 | virtual environment there is a folder | ||
54 | `exp_env/lib/python3.../site-packages`. Place the file | 54 | `exp_env/lib/python3.../site-packages`. Place the file | ||
55 | `experiment_evaluation.py` inside this folder (or a new sub-folder | 55 | `experiment_evaluation.py` inside this folder (or a new sub-folder | ||
56 | with all your personal scientific code) to make it | 56 | with all your personal scientific code) to make it | ||
57 | accessible.\r\n\r\nFrom within your code (try it from an interactive | 57 | accessible.\r\n\r\nFrom within your code (try it from an interactive | ||
58 | ipython session) you should now be able to import it | 58 | ipython session) you should now be able to import it | ||
59 | via:\r\n\r\n```\r\nimport experiment_evaluation as ee\r\n# or from | 59 | via:\r\n\r\n```\r\nimport experiment_evaluation as ee\r\n# or from | ||
60 | subfolder: import my_scientific_modules.experiment_evaluation as | 60 | subfolder: import my_scientific_modules.experiment_evaluation as | ||
61 | ee\r\n```\r\n\r\n### Matplotlib style\r\nIn order to use the fancy | 61 | ee\r\n```\r\n\r\n### Matplotlib style\r\nIn order to use the fancy | ||
62 | custom styles (for example for consistent looking graphs throughout | 62 | custom styles (for example for consistent looking graphs throughout | ||
63 | your publication) it is advised to use matplotlib styles. For the | 63 | your publication) it is advised to use matplotlib styles. For the | ||
64 | provided styles, copy the custom styles \"thesis_default.mplstyle\" | 64 | provided styles, copy the custom styles \"thesis_default.mplstyle\" | ||
65 | etc. from the folder `stylelib` inside your matplotlib library | 65 | etc. from the folder `stylelib` inside your matplotlib library | ||
66 | .9/site-packages/matplotlib/mpl-data/stylelib/*.mplstyle`\r\n\r\n\r\n# | 66 | .9/site-packages/matplotlib/mpl-data/stylelib/*.mplstyle`\r\n\r\n\r\n# | ||
67 | \ud83e\uddd1\u200d\ud83d\udcbb Usage\r\nA good way to learn its usage | 67 | \ud83e\uddd1\u200d\ud83d\udcbb Usage\r\nA good way to learn its usage | ||
68 | is to have a look at the | 68 | is to have a look at the | ||
69 | [example](examples/example_experiment_evaluation.ipynb) file. But | 69 | [example](examples/example_experiment_evaluation.ipynb) file. But | ||
70 | since the module is work in progress we first explain some | 70 | since the module is work in progress we first explain some | ||
71 | concepts.\r\n\r\n## \u2728 Why meta-data?\r\nThe module automates | 71 | concepts.\r\n\r\n## \u2728 Why meta-data?\r\nThe module automates | ||
72 | several steps of experiment evaluations. But the highlight is its | 72 | several steps of experiment evaluations. But the highlight is its | ||
73 | capability to handle experimental meta-data. This enables the user to | 73 | capability to handle experimental meta-data. This enables the user to | ||
74 | automatically choose and plot data with a question in mind (example: | 74 | automatically choose and plot data with a question in mind (example: | ||
75 | plot all EQE-curves at -2V and 173Hz) instead of repeatedly choosing | 75 | plot all EQE-curves at -2V and 173Hz) instead of repeatedly choosing | ||
76 | files manually. For calculations that need more than one measurement | 76 | files manually. For calculations that need more than one measurement | ||
77 | this becomes extremely useful but also for implementing | 77 | this becomes extremely useful but also for implementing | ||
78 | statistics.\r\nMeta data include things like experimental settings | 78 | statistics.\r\nMeta data include things like experimental settings | ||
79 | (applied voltage on a diode, time of the measurement, temperature | 79 | (applied voltage on a diode, time of the measurement, temperature | ||
80 | etc.), the experimentalist and technical informations (file-format | 80 | etc.), the experimentalist and technical informations (file-format | ||
81 | etc., manufacturer experimental device).\r\n\r\nThe module includes | 81 | etc., manufacturer experimental device).\r\n\r\nThe module includes | ||
82 | some generic functions but to use it for your specific lab environment | 82 | some generic functions but to use it for your specific lab environment | ||
83 | you might need to add experiment and plot specific | 83 | you might need to add experiment and plot specific | ||
84 | functions.\r\n\r\n## \ud83d\udcbe\ufe0f How to save your experiment | 84 | functions.\r\n\r\n## \ud83d\udcbe\ufe0f How to save your experiment | ||
85 | files?\r\nIn general lab measurement files stem from different devices | 85 | files?\r\nIn general lab measurement files stem from different devices | ||
86 | and export routines. So frankly speaking lab-data is often a mess! But | 86 | and export routines. So frankly speaking lab-data is often a mess! But | ||
87 | to use automatic evaluation tools some sort of system to recognize the | 87 | to use automatic evaluation tools some sort of system to recognize the | ||
88 | measurement-type and store the meta-data is needed. In an ideal world | 88 | measurement-type and store the meta-data is needed. In an ideal world | ||
89 | a lab would decide on one file format for all measurements and labels | 89 | a lab would decide on one file format for all measurements and labels | ||
90 | them systematically. To include different data-types and their | 90 | them systematically. To include different data-types and their | ||
91 | meta-data within one file-type there exists the *.asdf (advanced | 91 | meta-data within one file-type there exists the *.asdf (advanced | ||
92 | scientific data format, see their | 92 | scientific data format, see their | ||
93 | [documentation](https://asdf.readthedocs.io/en/stable/index.html) for | 93 | [documentation](https://asdf.readthedocs.io/en/stable/index.html) for | ||
94 | further insight). So if you are just starting with your PhD try to use | 94 | further insight). So if you are just starting with your PhD try to use | ||
95 | this file format everywhere ;).\r\nAlso to make experiments | 95 | this file format everywhere ;).\r\nAlso to make experiments | ||
96 | distinguishable every experiment needs an unique identifier. So you | 96 | distinguishable every experiment needs an unique identifier. So you | ||
97 | also should number every new experiment with an increasing number and | 97 | also should number every new experiment with an increasing number and | ||
98 | the type of the experiment.\r\n\r\nExample of useful file naming for | 98 | the type of the experiment.\r\n\r\nExample of useful file naming for | ||
99 | EQE measurements: `Nr783_EQE.asdf`\r\n\r\nIn the case of my PhD I | 99 | EQE measurements: `Nr783_EQE.asdf`\r\n\r\nIn the case of my PhD I | ||
100 | decided to use what I found: store the different file formats, store | 100 | decided to use what I found: store the different file formats, store | ||
101 | them in folders with the name of the experiment and include meta-data | 101 | them in folders with the name of the experiment and include meta-data | ||
102 | in the file-names (bad example: `EQE/Nr783_3volt_pix1.csv`). This was | 102 | in the file-names (bad example: `EQE/Nr783_3volt_pix1.csv`). This was | ||
103 | not the best idea (so learn from what I learned :P)\r\nTo handle that | 103 | not the best idea (so learn from what I learned :P)\r\nTo handle that | ||
104 | mess, this module therefore implements also some regular-expressions | 104 | mess, this module therefore implements also some regular-expressions | ||
105 | to extract meta-data from file-names (`ee.meta_from_filename()`), but | 105 | to extract meta-data from file-names (`ee.meta_from_filename()`), but | ||
106 | in general it is advised to store all meta-data in the file-header | 106 | in general it is advised to store all meta-data in the file-header | ||
107 | (with the exception of the unique identifier and experiment type). | 107 | (with the exception of the unique identifier and experiment type). | ||
108 | Like this you could store your files in whatever folder structure you | 108 | Like this you could store your files in whatever folder structure you | ||
109 | like and still find them from within the script. The module then | 109 | like and still find them from within the script. The module then | ||
110 | imports meta-data from the files into a database and you can do fancy | 110 | imports meta-data from the files into a database and you can do fancy | ||
111 | data-science with your data!\r\n\r\n## \ud83d\udcd1\ufe0f | 111 | data-science with your data!\r\n\r\n## \ud83d\udcd1\ufe0f | ||
112 | Database\r\nFor calculations and filtering of datasets the meta-data | 112 | Database\r\nFor calculations and filtering of datasets the meta-data | ||
113 | and data needs to be accessible in a machine readable form. For the | 113 | and data needs to be accessible in a machine readable form. For the | ||
114 | time being the module imports all meta-data into a pandas DataFrame | 114 | time being the module imports all meta-data into a pandas DataFrame | ||
115 | that represents our database (For very large datasets this would | 115 | that represents our database (For very large datasets this would | ||
116 | possibly be needed to be changed). For this we have to name the root | 116 | possibly be needed to be changed). For this we have to name the root | ||
117 | folder that includes all experiment files/folders.\r\n\r\n**Hint**: If | 117 | folder that includes all experiment files/folders.\r\n\r\n**Hint**: If | ||
118 | you did not follow the unique labeling/numbering for all your | 118 | you did not follow the unique labeling/numbering for all your | ||
119 | experiments you can still use this module by choosing a root folder | 119 | experiments you can still use this module by choosing a root folder | ||
120 | that only includes the current experiment.\r\n\r\n```\r\nfrom pathlib | 120 | that only includes the current experiment.\r\n\r\n```\r\nfrom pathlib | ||
121 | import Path\r\nmeasurement_root_folder = | 121 | import Path\r\nmeasurement_root_folder = | ||
122 | Path(\"/home/PhD/Data/\")\r\n```\r\n\r\nWe can specify some | 122 | Path(\"/home/PhD/Data/\")\r\n```\r\n\r\nWe can specify some | ||
123 | pre-filtering for the specific experiment we want to | 123 | pre-filtering for the specific experiment we want to | ||
124 | evaluate:\r\n\r\n```\r\n# make use of the '/' operator to build OS | 124 | evaluate:\r\n\r\n```\r\n# make use of the '/' operator to build OS | ||
125 | independant paths\r\nmeasurement_folder = measurement_root_folder / | 125 | independant paths\r\nmeasurement_folder = measurement_root_folder / | ||
126 | \"LaserLab\" / \"proximity-sensor\" / \"OPD-Lens\" / \"OPD-Lens_v2\" | 126 | \"LaserLab\" / \"proximity-sensor\" / \"OPD-Lens\" / \"OPD-Lens_v2\" | ||
127 | \r\n\r\n# Define some pre-filter\r\ndevices = [nr for nr in | 127 | \r\n\r\n# Define some pre-filter\r\ndevices = [nr for nr in | ||
128 | range(1035, 1043)] # Unique sample numbers of the experiment listed | 128 | range(1035, 1043)] # Unique sample numbers of the experiment listed | ||
129 | by list-comprehension \r\nexplst = \"Mervin | 129 | by list-comprehension \r\nexplst = \"Mervin | ||
130 | Seiberlich\"\r\n\r\n```\r\n\r\nThen we import the metadata into the | 130 | Seiberlich\"\r\n\r\n```\r\n\r\nThen we import the metadata into the | ||
131 | pandas DataFrame database via `ee.list_measurements()` and call it | 131 | pandas DataFrame database via `ee.list_measurements()` and call it | ||
132 | *meta-table*:\r\n\r\n```\r\nmeta_table = | 132 | *meta-table*:\r\n\r\n```\r\nmeta_table = | ||
133 | ee.list_measurements(measurement_root_folder, devices, | 133 | ee.list_measurements(measurement_root_folder, devices, | ||
134 | experimentalist=explst, sort_by=[\"measurement_type\", \"nr\", | 134 | experimentalist=explst, sort_by=[\"measurement_type\", \"nr\", | ||
135 | \"pix\", \"v\"])\r\n```\r\n\r\n### \ud83d\udca1\ufe0f Advanced | 135 | \"pix\", \"v\"])\r\n```\r\n\r\n### \ud83d\udca1\ufe0f Advanced | ||
136 | note:\r\nInternally `ee.list_measurements()` uses custom functions to | 136 | note:\r\nInternally `ee.list_measurements()` uses custom functions to | ||
137 | import the experiment specific meta-data. Have a look into the | 137 | import the experiment specific meta-data. Have a look into the | ||
138 | source-code and search for `read_meta` for an example how this works | 138 | source-code and search for `read_meta` for an example how this works | ||
139 | in detail. With the *.asdf file-format only the generalized import | 139 | in detail. With the *.asdf file-format only the generalized import | ||
140 | function would be needed.\r\n\r\n## Import data and meta-data\r\nTo | 140 | function would be needed.\r\n\r\n## Import data and meta-data\r\nTo | ||
141 | import now some measurement data for plotting we use the information | 141 | import now some measurement data for plotting we use the information | ||
142 | inside *meta_table* with custom import routines and python | 142 | inside *meta_table* with custom import routines and python | ||
143 | dictionaries implementing our filters: \r\n\r\n```\r\n# Distinguish | 143 | dictionaries implementing our filters: \r\n\r\n```\r\n# Distinguish | ||
144 | between reference and other measurments\r\nlens = | 144 | between reference and other measurments\r\nlens = | ||
145 | {\"nr\":devices[:5]}\r\nref = {\"nr\":devices[5:]}\r\n\r\n# Select by | 145 | {\"nr\":devices[:5]}\r\nref = {\"nr\":devices[5:]}\r\n\r\n# Select by | ||
146 | bias and compare reference samples with lens (**dict unpacks the | 146 | bias and compare reference samples with lens (**dict unpacks the | ||
147 | values to combine two or mor dictionaries)\r\neqe_lens_0V = | 147 | values to combine two or mor dictionaries)\r\neqe_lens_0V = | ||
148 | ee.import_eqe(meta_table, mask_dict={**lens, | 148 | ee.import_eqe(meta_table, mask_dict={**lens, | ||
149 | **{\"v\":0}})\r\neqe_ref_0V = ee.import_eqe(meta_table, | 149 | **{\"v\":0}})\r\neqe_ref_0V = ee.import_eqe(meta_table, | ||
150 | mask_dict={**ref, **{\"v\":0}})\r\n```\r\n\r\nThis yields python lists | 150 | mask_dict={**ref, **{\"v\":0}})\r\n```\r\n\r\nThis yields python lists | ||
151 | `eqe_lens_0V = [table1, table2, ... tableN]` with the selected data | 151 | `eqe_lens_0V = [table1, table2, ... tableN]` with the selected data | ||
152 | ready for plotting (Lists are maybe not smart for huge dataset and | 152 | ready for plotting (Lists are maybe not smart for huge dataset and | ||
153 | some N-dimensional object can replace this in future). Note: The | 153 | some N-dimensional object can replace this in future). Note: The | ||
154 | tables inside the list are | 154 | tables inside the list are | ||
155 | astropy.QTable()](https://docs.astropy.org/en/stable/table/index.html) | 155 | astropy.QTable()](https://docs.astropy.org/en/stable/table/index.html) | ||
156 | objects including the data and meta-data, as well as units!\r\n\r\nSo | 156 | objects including the data and meta-data, as well as units!\r\n\r\nSo | ||
157 | with this few lines of code you already did some advanced data | 157 | with this few lines of code you already did some advanced data | ||
158 | filtering and import!\r\n\r\n\r\n## \ud83c\udf21\ufe0f Physical | 158 | filtering and import!\r\n\r\n\r\n## \ud83c\udf21\ufe0f Physical | ||
159 | units\r\nThe module astropy includes a submodule astropy.units. Since | 159 | units\r\nThe module astropy includes a submodule astropy.units. Since | ||
160 | we deal with real world data, it is a good idea to also include units | 160 | we deal with real world data, it is a good idea to also include units | ||
161 | in calculations.\r\n\r\n```\r\nimport astropy.units as u\r\n\r\n# | 161 | in calculations.\r\n\r\n```\r\nimport astropy.units as u\r\n\r\n# | ||
162 | Radius of one microlens:\r\nr = 98 * u.um\r\n```\r\n\r\n## | 162 | Radius of one microlens:\r\nr = 98 * u.um\r\n```\r\n\r\n## | ||
163 | \ud83d\udcdd\ufe0f Calculations\r\nIf you have to repeatedly do some | 163 | \ud83d\udcdd\ufe0f Calculations\r\nIf you have to repeatedly do some | ||
164 | advanced calculations or fits for some plots, include them as | 164 | advanced calculations or fits for some plots, include them as | ||
165 | functions in the source-code. An example would be | 165 | functions in the source-code. An example would be | ||
166 | `ee.pink_noise()`\r\n\r\n## \ud83d\udcca\ufe0f Plots\r\nFor plotting | 166 | `ee.pink_noise()`\r\n\r\n## \ud83d\udcca\ufe0f Plots\r\nFor plotting | ||
167 | there exists many modules in python. Due to its grate power we use | 167 | there exists many modules in python. Due to its grate power we use | ||
168 | matplotlib. This comes with the cost of some complexity (definitely | 168 | matplotlib. This comes with the cost of some complexity (definitely | ||
169 | have a look at its [documentation!](https://matplotlib.org)). But this | 169 | have a look at its [documentation!](https://matplotlib.org)). But this | ||
170 | enables us for example to have a consistence color style, figure-size | 170 | enables us for example to have a consistence color style, figure-size | ||
171 | and text-size in large projects like a | 171 | and text-size in large projects like a | ||
172 | PhD-thesis:\r\n\r\n```\r\nmpl.style.use([\"thesis_default\", | 172 | PhD-thesis:\r\n\r\n```\r\nmpl.style.use([\"thesis_default\", | ||
173 | \"thesis_talk\"]) # We use style-sheets to set things like | 173 | \"thesis_talk\"]) # We use style-sheets to set things like | ||
174 | figure-size and text-size, see | 174 | figure-size and text-size, see | ||
175 | le/tutorials/introductory/customizing.html#composing-styles\r\n\r\nw,h | 175 | le/tutorials/introductory/customizing.html#composing-styles\r\n\r\nw,h | ||
176 | = plt.rcParams['figure.figsize'] # get the default size for figures to | 176 | = plt.rcParams['figure.figsize'] # get the default size for figures to | ||
177 | scale plots accordingly\r\n```\r\n\r\nIn order to not invent the wheel | 177 | scale plots accordingly\r\n```\r\n\r\nIn order to not invent the wheel | ||
178 | over and over again it makes sense to wrap some plotting routines for | 178 | over and over again it makes sense to wrap some plotting routines for | ||
179 | each experiment inside some custom functions. For further detail see | 179 | each experiment inside some custom functions. For further detail see | ||
180 | the [documentation/recommended function signature for matplotlib | 180 | the [documentation/recommended function signature for matplotlib | ||
181 | specialized | 181 | specialized | ||
182 | tions](https://matplotlib.org/2.0.2/faq/usage_faq.html#coding-styles). | 182 | tions](https://matplotlib.org/2.0.2/faq/usage_faq.html#coding-styles). | ||
183 | This enables easy experiment-type specific plotting (even with | 183 | This enables easy experiment-type specific plotting (even with | ||
184 | statistics) once all functions are set up:\r\n\r\n```\r\n# %% plot eqe | 184 | statistics) once all functions are set up:\r\n\r\n```\r\n# %% plot eqe | ||
185 | statistics\r\nfig, ax = plt.subplots(1,1, figsize=(w, h), | 185 | statistics\r\nfig, ax = plt.subplots(1,1, figsize=(w, h), | ||
186 | layout=\"constrained\")\r\n\r\nee.plot_eqe(ax, eqe_lens_0V, | 186 | layout=\"constrained\")\r\n\r\nee.plot_eqe(ax, eqe_lens_0V, | ||
187 | statistics=True, color=\"tab:green\", plot_type=\"EQE\", marker=True, | 187 | statistics=True, color=\"tab:green\", plot_type=\"EQE\", marker=True, | ||
188 | ncol=2)\r\nee.plot_eqe(ax, eqe_ref_0V, statistics=True, | 188 | ncol=2)\r\nee.plot_eqe(ax, eqe_ref_0V, statistics=True, | ||
189 | color=\"tab:blue\", plot_type=\"EQE\", marker=True, | 189 | color=\"tab:blue\", plot_type=\"EQE\", marker=True, | ||
190 | ncol=2)\r\nax.set_ylim(0,60)\r\nax.legend([\"Lens\",\"$1\\sigma - | 190 | ncol=2)\r\nax.set_ylim(0,60)\r\nax.legend([\"Lens\",\"$1\\sigma - | ||
191 | Lens$\", \"Reference\", \"$1\\sigma - reference$\"], loc=\"lower | 191 | Lens$\", \"Reference\", \"$1\\sigma - reference$\"], loc=\"lower | ||
192 | left\", ncol=2)\r\n```\r\n\r\nOnly 5 lines of code! For further | 192 | left\", ncol=2)\r\n```\r\n\r\nOnly 5 lines of code! For further | ||
193 | details see the | 193 | details see the | ||
194 | [example](examples/example_experiment_evaluation.ipynb) | 194 | [example](examples/example_experiment_evaluation.ipynb) | ||
195 | file!\r\n\r\n\r\n# \ud83d\udcd6 FAQ\r\n1. How do I get further | 195 | file!\r\n\r\n\r\n# \ud83d\udcd6 FAQ\r\n1. How do I get further | ||
196 | information about the functions of the module?\r\nUse the doc-string! | 196 | information about the functions of the module?\r\nUse the doc-string! | ||
197 | In jupyter-lab or ipython type for example `ee.plot_eqe?` to read more | 197 | In jupyter-lab or ipython type for example `ee.plot_eqe?` to read more | ||
198 | about the custom plot function for eqe measurements\r\n\r\n2. How do I | 198 | about the custom plot function for eqe measurements\r\n\r\n2. How do I | ||
199 | exclude some specific measurements (outliers, | 199 | exclude some specific measurements (outliers, | ||
200 | false_measurements)?\r\nImport functions now implement an `exclude` | 200 | false_measurements)?\r\nImport functions now implement an `exclude` | ||
201 | argument comprising a list of dictionarys to exclude specific | 201 | argument comprising a list of dictionarys to exclude specific | ||
202 | data.\r\n```\r\ndata_dark_pcbm_ref = ee.import_iV(meta_table, | 202 | data.\r\n```\r\ndata_dark_pcbm_ref = ee.import_iV(meta_table, | ||
203 | A=0.01*u.cm**2, mask_dict={\"nr\":PCBM, **pix}, | 203 | A=0.01*u.cm**2, mask_dict={\"nr\":PCBM, **pix}, | ||
204 | exclude=[{\"c\":[25,150]}, | 204 | exclude=[{\"c\":[25,150]}, | ||
205 | {\"solventOnly\":True}])\r\n```\r\nSometimes it is helpful to only | 205 | {\"solventOnly\":True}])\r\n```\r\nSometimes it is helpful to only | ||
206 | append single measurements by the += operator though. Here is an | 206 | append single measurements by the += operator though. Here is an | ||
207 | example:\r\n\r\n```\r\ndata_ldr_0V = ee.import_ldr(meta_table, | 207 | example:\r\n\r\n```\r\ndata_ldr_0V = ee.import_ldr(meta_table, | ||
208 | mask_dict={\"nr\":[1035, 1036, 1037, 1038, 1039, 1040, 1041], \"v\":0, | 208 | mask_dict={\"nr\":[1035, 1036, 1037, 1038, 1039, 1040, 1041], \"v\":0, | ||
209 | \"custompower\":[0, 9.5]})\r\ndata_ldr_0V += ee.import_ldr(meta_table, | 209 | \"custompower\":[0, 9.5]})\r\ndata_ldr_0V += ee.import_ldr(meta_table, | ||
210 | mask_dict={\"nr\":1042, \"pix\":1, \"v\":0, \"custompower\":[0, | 210 | mask_dict={\"nr\":1042, \"pix\":1, \"v\":0, \"custompower\":[0, | ||
211 | 9.5]})\r\n```\r\n\r\n\r\n# \ud83d\udc65\ufe0f Contributors and | 211 | 9.5]})\r\n```\r\n\r\n\r\n# \ud83d\udc65\ufe0f Contributors and | ||
212 | acknowledgment\r\nMany question were answered by searching through | 212 | acknowledgment\r\nMany question were answered by searching through | ||
213 | forums and the author is very thankful for the culture of openness in | 213 | forums and the author is very thankful for the culture of openness in | ||
214 | the FOSS community.\r\n\r\nA warm thank you goes to [Jyh-Miin | 214 | the FOSS community.\r\n\r\nA warm thank you goes to [Jyh-Miin | ||
215 | Lin](https://github.com/jyhmiinlin) who provided a helpful example and | 215 | Lin](https://github.com/jyhmiinlin) who provided a helpful example and | ||
216 | explanations on how to use the excellent | 216 | explanations on how to use the excellent | ||
217 | [pynufft](https://github.com/jyhmiinlin/pynufft) package for | 217 | [pynufft](https://github.com/jyhmiinlin/pynufft) package for | ||
218 | non-uniform FFT.\r\n\r\n\r\n# \ud83d\udc8c\ufe0f | 218 | non-uniform FFT.\r\n\r\n\r\n# \ud83d\udc8c\ufe0f | ||
219 | License\r\n\r\nLicense:\r\n\r\nCopyright (C) 2022-2023 Mervin | 219 | License\r\n\r\nLicense:\r\n\r\nCopyright (C) 2022-2023 Mervin | ||
220 | Seiberlich\r\n\r\nAuthor - Mervin Seiberlich\r\n\r\nThis file is part | 220 | Seiberlich\r\n\r\nAuthor - Mervin Seiberlich\r\n\r\nThis file is part | ||
221 | of experiment_evaluation.\r\n\r\nexperiment_evaluation is free | 221 | of experiment_evaluation.\r\n\r\nexperiment_evaluation is free | ||
222 | software: you can redistribute it and/or modify it under the terms of | 222 | software: you can redistribute it and/or modify it under the terms of | ||
223 | the GNU General Public License as published by the Free Software | 223 | the GNU General Public License as published by the Free Software | ||
224 | Foundation, either version 3 of the License, or (at your option) any | 224 | Foundation, either version 3 of the License, or (at your option) any | ||
225 | later version.\r\n\r\nexperiment_evaluation is distributed in the hope | 225 | later version.\r\n\r\nexperiment_evaluation is distributed in the hope | ||
226 | that it will be useful, but WITHOUT ANY WARRANTY; without even the | 226 | that it will be useful, but WITHOUT ANY WARRANTY; without even the | ||
227 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | 227 | implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
228 | PURPOSE. See the GNU General Public License for more | 228 | PURPOSE. See the GNU General Public License for more | ||
229 | details.\r\n\r\nYou should have received a copy of the GNU General | 229 | details.\r\n\r\nYou should have received a copy of the GNU General | ||
230 | Public License along with experiment_evaluation. If not, see | 230 | Public License along with experiment_evaluation. If not, see | ||
231 | <https://www.gnu.org/licenses/>.", | 231 | <https://www.gnu.org/licenses/>.", | ||
232 | "num_resources": 0, | 232 | "num_resources": 0, | ||
233 | "num_tags": 4, | 233 | "num_tags": 4, | ||
234 | "orcid": "0000-0002-6013-169X", | 234 | "orcid": "0000-0002-6013-169X", | ||
235 | "organization": { | 235 | "organization": { | ||
236 | "approval_status": "approved", | 236 | "approval_status": "approved", | ||
237 | "created": "2023-01-12T13:30:23.238233", | 237 | "created": "2023-01-12T13:30:23.238233", | ||
238 | "description": "RADAR (Research Data Repository) is a | 238 | "description": "RADAR (Research Data Repository) is a | ||
239 | cross-disciplinary repository for archiving and publishing research | 239 | cross-disciplinary repository for archiving and publishing research | ||
240 | data from completed scientific studies and projects. The focus is on | 240 | data from completed scientific studies and projects. The focus is on | ||
241 | research data from subjects that do not yet have their own | 241 | research data from subjects that do not yet have their own | ||
242 | discipline-specific infrastructures for research data management. ", | 242 | discipline-specific infrastructures for research data management. ", | ||
243 | "id": "013c89a9-383c-4200-8baa-0f78bf1d91f9", | 243 | "id": "013c89a9-383c-4200-8baa-0f78bf1d91f9", | ||
244 | "image_url": "radar-logo.svg", | 244 | "image_url": "radar-logo.svg", | ||
245 | "is_organization": true, | 245 | "is_organization": true, | ||
246 | "name": "radar", | 246 | "name": "radar", | ||
247 | "state": "active", | 247 | "state": "active", | ||
248 | "title": "RADAR", | 248 | "title": "RADAR", | ||
249 | "type": "organization" | 249 | "type": "organization" | ||
250 | }, | 250 | }, | ||
251 | "owner_org": "013c89a9-383c-4200-8baa-0f78bf1d91f9", | 251 | "owner_org": "013c89a9-383c-4200-8baa-0f78bf1d91f9", | ||
252 | "private": false, | 252 | "private": false, | ||
253 | "production_year": "2023", | 253 | "production_year": "2023", | ||
254 | "publication_year": "2023", | 254 | "publication_year": "2023", | ||
255 | "publishers": [ | 255 | "publishers": [ | ||
256 | { | 256 | { | ||
257 | "publisher": "Karlsruhe Institute of Technology" | 257 | "publisher": "Karlsruhe Institute of Technology" | ||
258 | } | 258 | } | ||
259 | ], | 259 | ], | ||
260 | "relationships_as_object": [], | 260 | "relationships_as_object": [], | ||
261 | "relationships_as_subject": [], | 261 | "relationships_as_subject": [], | ||
262 | "repository_name": "RADAR (Research Data Repository)", | 262 | "repository_name": "RADAR (Research Data Repository)", | ||
263 | "resources": [], | 263 | "resources": [], | ||
264 | "services_used_list": "", | 264 | "services_used_list": "", | ||
265 | "source_metadata_created": "2023", | 265 | "source_metadata_created": "2023", | ||
266 | "source_metadata_modified": "", | 266 | "source_metadata_modified": "", | ||
267 | "state": "active", | 267 | "state": "active", | ||
268 | "subject_areas": [ | 268 | "subject_areas": [ | ||
269 | { | 269 | { | ||
270 | "subject_area_additional": "", | 270 | "subject_area_additional": "", | ||
271 | "subject_area_name": "Engineering" | 271 | "subject_area_name": "Engineering" | ||
272 | } | 272 | } | ||
273 | ], | 273 | ], | ||
274 | "tags": [ | 274 | "tags": [ | ||
275 | { | 275 | { | ||
276 | "display_name": "RSE", | 276 | "display_name": "RSE", | ||
277 | "id": "8bb5fbc4-3716-4ff7-8c63-30e734b8e74f", | 277 | "id": "8bb5fbc4-3716-4ff7-8c63-30e734b8e74f", | ||
278 | "name": "RSE", | 278 | "name": "RSE", | ||
279 | "state": "active", | 279 | "state": "active", | ||
280 | "vocabulary_id": null | 280 | "vocabulary_id": null | ||
281 | }, | 281 | }, | ||
282 | { | 282 | { | ||
283 | "display_name": "data evaluation", | 283 | "display_name": "data evaluation", | ||
284 | "id": "effe8a24-f75f-4d8c-a289-7e0b7bf00788", | 284 | "id": "effe8a24-f75f-4d8c-a289-7e0b7bf00788", | ||
285 | "name": "data evaluation", | 285 | "name": "data evaluation", | ||
286 | "state": "active", | 286 | "state": "active", | ||
287 | "vocabulary_id": null | 287 | "vocabulary_id": null | ||
288 | }, | 288 | }, | ||
289 | { | 289 | { | ||
290 | "display_name": "metadata", | 290 | "display_name": "metadata", | ||
291 | "id": "25e98795-9bfe-4363-918b-d0052f4a5acd", | 291 | "id": "25e98795-9bfe-4363-918b-d0052f4a5acd", | ||
292 | "name": "metadata", | 292 | "name": "metadata", | ||
293 | "state": "active", | 293 | "state": "active", | ||
294 | "vocabulary_id": null | 294 | "vocabulary_id": null | ||
295 | }, | 295 | }, | ||
296 | { | 296 | { | ||
297 | "display_name": "python", | 297 | "display_name": "python", | ||
298 | "id": "1aa46c25-ca52-4c40-beb0-e05f0e1aa1e7", | 298 | "id": "1aa46c25-ca52-4c40-beb0-e05f0e1aa1e7", | ||
299 | "name": "python", | 299 | "name": "python", | ||
300 | "state": "active", | 300 | "state": "active", | ||
301 | "vocabulary_id": null | 301 | "vocabulary_id": null | ||
302 | } | 302 | } | ||
303 | ], | 303 | ], | ||
304 | "title": "Experiment_evaluation", | 304 | "title": "Experiment_evaluation", | ||
305 | "type": "vdataset", | 305 | "type": "vdataset", | ||
306 | "url": "https://doi.org/10.35097/1426" | 306 | "url": "https://doi.org/10.35097/1426" | ||
307 | } | 307 | } |