refellips.dataSE
A basic representation of a 1D dataset
- class refellips.dataSE.DataSE(data=None, name=None, delimiter='\t', reflect_delta=False, **kwds)
Bases:
objectA basic representation of a 1D dataset.
- Parameters:
data ({str, file-like, Path, tuple of np.ndarray}, optional) –
String pointing to a data file. Alternatively it is a tuple containing the data from which the dataset will be constructed. The tuple should have 4 members.
data[0] - Wavelength (nm)
data[1] - Angle of incidence (degree)
data[2] - Psi
data[3] - Delta
data must be four long. All arrays must have the same shape.
mask (array-like) – Specifies which data points are (un)masked. Must be broadcastable to the data. Data1D.mask = None clears the mask. If a mask value equates to True, then the point is included, if a mask value equates to False it is excluded.
reflect_delta (bool) – Specifies whether delta values are reflected around 180 degrees (i.e., 360 - delta[delta > 180]), as is standard for some ellipsometry analysis packages (i.e., WVASE).
- AOI
angle of incidence (degree)
- Type:
np.ndarray
- mask
mask
- Type:
np.ndarray
- filename
The file the data was read from
- Type:
str or None
- weighted
Whether the y data has uncertainties
- Type:
bool
- metadata
Information that should be retained with the dataset.
- Type:
dict
- property aoi
Angle of incidence.
- property data
4-tuple containing the (wavelength), AOI, psi, delta) data.
- property delta
Ellipsometric parameter delta.
- load(f)
Load a dataset from file. Must be a 4 column ASCII file with columns [wavelength, AOI, Psi, Delta].
- Parameters:
f (file-handle or string) – File to load the dataset from.
- property psi
Ellipsometric parameter psi.
- refresh()
Refreshes a previously loaded dataset.
- save(f)
Save the data to file. Saves the data as a 4 column ASCII file.
- Parameters:
f (file-handle or string) – File to save the dataset to.
- unique_wavelength_data()
Generator yielding wavelength, AOI, psi, delta tuples for the unique wavelengths in a dataset (i.e. all the data points for a given wavelength)
- Return type:
wavelength, AOI, psi, delta
- property wavelength
- refellips.dataSE.custom_round(x, base=0.25)
Perform rounding to a particular base. Default base is 0.25.
- Parameters:
x (DataFrame, array or list) – Data to be rounded.
base (float) – Base that the rounding will be with respect to.
- Returns:
Result of cutsom round
- Return type:
np.array
- refellips.dataSE.open_EP4file(fname, reflect_delta=False)
Open and load in an Accurion EP4 formmated data file. Typically a .dat file.
Note: This file parser has been written for specific Accurion ellipsometers EP3 and EP4. No work has been done to ensure it is compatible with all Accurion ellipsometers. If you have trouble with this parser contact the maintainers through github.
- Parameters:
fname (file-handle or string) – File to load the dataset from.
reflect_delta (bool) – Option to reflect delta around 180 degrees (as WVASE would).
- Returns:
datasets – Structure containing wavelength, angle of incidence, psi and delta.
- Return type:
DataSE structure
- refellips.dataSE.open_FilmSenseFile(fname)
Opens text files exported from FilmSense ellipsometers.
- Parameters:
fname (file-handle or string) – File to load the dataset from.
- Returns:
datasets – If the file contains a single measurment, function returns a single DataSE object containing wavelength, angle of incidence, psi and delta.
If the file contains multiple measurements, such as a time- series dataset, then it returns a dictionary containing DataSE objects for each measurement point. The Dictionary keys correspond to the measurement details (e.g., time).
Metadata contained within the file is stored in DataSE.metadata.
- Return type:
DataSE structure or dict
- refellips.dataSE.open_HORIBAfile(fname, reflect_delta=False, lambda_cutoffs=[-inf, inf])
Opening and loading in a data file created by a Horiba ellipsometer. Data file loaded should be of the Horiba file format .spe.
Note: This file parser has been written for a specific ellipsometer, no work has been done to ensure it is compatable with all Horiba ellipsometers. If you have trouble with this parser contact the maintainers through github.
- Parameters:
fname (file-handle or string) – File to load the dataset from.
reflect_delta (bool) – Option to reflect delta around 180 degrees (as WVASE would).
lambda_cutoffs (list) – Specifies the minimum and maximum wavelengths of data to be loaded. List has length 2.
- Returns:
DataSE – The data file structure from the loaded Horiba file.
- Return type:
DataSE structure
- refellips.dataSE.open_M2000file(fname, take_every=1, dropdatapoints=1)
Opens raw text files exported by Woolam’s ‘CompleteEASE’ software.
- Parameters:
fname (file-handle or string) – File to load the dataset from.
dropdatapoints (int) – Includes every nth element from the woolam dataset in DataSE. Use to speed up fitting for datasets where a narrow wavelength resolution is not required.
take_every (int) – For time-resolved data sets only. Includes every nth dataset in the returned dictionary. Usefully for reducing the number of data points that needs to be processed when you don’t need high temporaral resolution
- Returns:
datasets – If the file contains a single measurment, function returns a single DataSE object containing wavelength, angle of incidence, psi and delta.
If the file contains multiple measurements, such as a time- series dataset, then it returns a dictionary containing DataSE objects for each measurement point. The Dictionary keys correspond to the measurement details (e.g., time in seconds).
Metadata contained within the file is stored in DataSE.metadata.
- Return type:
DataSE structure or dict