mirror of
https://github.com/yosata/fourierOptics.git
synced 2026-10-29 20:51:10 +00:00
Another small update to file descriptions
This commit is contained in:
1 parent
b449520c97
commit
6db337a09c
1 file changed
+40
@@ -2,6 +2,46 @@
|
||||
|
||||
Most of the files contained in this folder are intermediate results that I later used for plotting a figure or - in some cases - continuing an analysis.
|
||||
|
||||
The files are pickle files. Be careful with opening pickle files if you don't trust the source! If you do trust me, then go ahead. The following functions were used during this work and can be used to save and load the variables:
|
||||
```python
|
||||
def save_variable(filename, variable):
|
||||
'''
|
||||
Dumps the given variable to a binary pickle file
|
||||
for later use.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
filename : string
|
||||
Filename, possibly including the location
|
||||
where it needs to be saved.
|
||||
variable : TYPE
|
||||
The variable to be saved.
|
||||
'''
|
||||
with open(filename, 'wb') as f:
|
||||
pickle.dump(variable, f, protocol=-1 )
|
||||
|
||||
|
||||
def load_variable(filename):
|
||||
'''
|
||||
Loads a binary pickle file for use.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
filename : string
|
||||
Description
|
||||
|
||||
Returns
|
||||
-------
|
||||
TYPE
|
||||
variable
|
||||
'''
|
||||
with open(filename, 'rb') as f:
|
||||
variable = pickle.load(f)
|
||||
return variable
|
||||
|
||||
```
|
||||
|
||||
|
||||
## `/ADC rotation`
|
||||
Contains the "nominal" and "perturbed" geometric distortion points for various rotation angles of the ADC.
|
||||
|
||||
|
||||
Reference in new issue
Block a user