Readers¤
The following Readers are available
- DRSReader — Detector Responsivity System file format (MSL Light Standards)
- HDF5Reader — HDF5 file format
- JSONReader — Read a file created by JSONWriter
- RegularTransmittanceReader — Spectrophotometer transmittance file format (MSL Light Standards)
DRSReader
¤
Bases: Reader
Reader for the Detector Responsivity System in MSL Light Standards.
Source code in src/msl/io/base.py
160 161 162 163 164 165 166 167 | |
can_read
staticmethod
¤
Checks if the first line starts with DRS and ends with Shindo.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
ReadLike | str
|
The file to check. |
required |
kwargs
|
Any
|
All keyword arguments are ignored. |
{}
|
Returns:
| Type | Description |
|---|---|
bool
|
Whether |
Source code in src/msl/io/readers/detector_responsivity_system.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
read
¤
read(**kwargs: Any) -> None
Reads the .DAT and corresponding .LOG file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kwargs
|
Any
|
All keyword arguments are ignored. |
{}
|
Source code in src/msl/io/readers/detector_responsivity_system.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
HDF5Reader
¤
Bases: Reader
Reader for the HDF5 file format.
Info
This Reader loads the entire HDF5 file in memory. If you need to use any of the more advanced features of an HDF5 file, it is best to directly load the file using h5py.
Source code in src/msl/io/base.py
160 161 162 163 164 165 166 167 | |
can_read
staticmethod
¤
Checks if the file has the HDF5 signature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
ReadLike | str
|
The file to check. |
required |
kwargs
|
Any
|
All keyword arguments are ignored. |
{}
|
Returns:
| Type | Description |
|---|---|
bool
|
Whether the first 8 bytes are |
Source code in src/msl/io/readers/hdf5.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
read
¤
read(**kwargs: Any) -> None
Reads the HDF5 file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kwargs
|
Any
|
All keyword arguments are passed to h5py.File. |
{}
|
Source code in src/msl/io/readers/hdf5.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | |
JSONReader
¤
Bases: Reader
Read a file that was created by JSONWriter.
Source code in src/msl/io/base.py
160 161 162 163 164 165 166 167 | |
can_read
staticmethod
¤
Checks if the file was created by JSONWriter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
ReadLike | str
|
The file to check. |
required |
kwargs
|
Any
|
All keyword arguments are passed to get_lines. |
{}
|
Returns:
| Type | Description |
|---|---|
bool
|
Whether the text |
Source code in src/msl/io/readers/json_.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | |
read
¤
read(**kwargs: Any) -> None
Read the file that was created by JSONWriter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kwargs
|
Any
|
Accepts |
{}
|
Source code in src/msl/io/readers/json_.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
RegularTransmittanceReader
¤
Bases: Reader
Reader for Trans files from Light Standards at MSL.
Source code in src/msl/io/base.py
160 161 162 163 164 165 166 167 | |
can_read
staticmethod
¤
Checks if the file extension is .dat and the filename starts with Trans_.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
ReadLike | str
|
The file to check. |
required |
kwargs
|
Any
|
All keyword arguments are ignored. |
{}
|
Source code in src/msl/io/readers/spectrophotometer_trans_reader.py
21 22 23 24 25 26 27 28 29 30 | |
read
¤
read(**kwargs: Any) -> None
Reads the data in the corresponding .log and .celsius files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
kwargs
|
Any
|
All keyword arguments are ignored. |
{}
|
Source code in src/msl/io/readers/spectrophotometer_trans_reader.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |