PyJEM.femtus.process¶
- PyJEM.femtus.process.binning(datasetid, param)¶
Perform binning operation.
- Parameters:
datasetid (str) – Unique identifier of the target dataset.
param (dict) –
Dictionary of binning parameters.
⇒ See Binning param items.
Binning param items
key
type
value
Sizes
list[int]
List of binning sizes to apply.
- Return type:
None
Examples
>>> param = { "Sizes": [ 1, 2 ] } >>> binning('781519d9-9063-4fb3-a392-8f27d837c6d4', param)
- PyJEM.femtus.process.extract(datasetid, param)¶
Extract a range from the target.
- Parameters:
datasetid (str) – Unique identifier of the target dataset.
param (dict) –
Dictionary specifying the extraction range.
⇒ See Extract param items.
items
key
type
value
Range
list[dict]
List of extraction range entries.
⇒ See Extract range items.
Range items
key
type
value
Start
int
Start energy value (e.g., 0).
End
int
End energy value (e.g., 255).
- Return type:
None
Examples
>>> param = { "Range": [ { "End": 255, "Start": 0 }, { "End": 255, "Start": 0 } ] } >>> extract('781519d9-9063-4fb3-a392-8f27d837c6d4', param)
- PyJEM.femtus.process.integrate(datasetid, param)¶
Integrate data along a specified axis and range.
- Parameters:
datasetid (str) – The datasetid of the target.
param (dict) –
Dictionary specifying integration parameters.
⇒ See Integrate param items.
items
key
type
value
Axis
str
Axis along which to integrate. One of
"X","Y","Z".Range
dict
Integration range.
⇒ See Integrate range items.
Range items
key
type
value
Start
int
Start value of the range.
End
int
End value of the range.
- Return type:
None
Examples
>>> param = { "Axis": "X", "Range": { "End": 255, "Start": 0 } } >>> integrate('781519d9-9063-4fb3-a392-8f27d837c6d4', param)
- PyJEM.femtus.process.fft(datasetid)¶
Perform FFT on the target.
- Parameters:
datasetid (str) – The datasetid of the target.
- Return type:
None
Examples
>>> fft('781519d9-9063-4fb3-a392-8f27d837c6d4')
- PyJEM.femtus.process.ifft(datasetid)¶
Perform inverse FFT on the target.
- Parameters:
datasetid (str) – The datasetid of the target.
- Return type:
None
Examples
>>> ifft('781519d9-9063-4fb3-a392-8f27d837c6d4')
- PyJEM.femtus.process.flip(datasetid, body)¶
Flip the image horizontally and/or vertically.
- Parameters:
datasetid (str) – The datasetid of the target.
body (dict) –
Dictionary specifying flip directions.
⇒ See Flip body items.
items
key
type
value
Horizontal
bool
If
True, apply horizontal flip.Vertical
bool
If
True, apply vertical flip.
- Return type:
None
Examples
>>> param = { "Horizontal": True, "Vertical": True } >>> flip('781519d9-9063-4fb3-a392-8f27d837c6d4', param)
- PyJEM.femtus.process.rotation(datasetid, body)¶
Rotate the image.
- Parameters:
datasetid (str) – The datasetid of the target.
body (dict) –
Dictionary specifying rotation parameters.
⇒ See Rotation body items.
items
key
type
value
Angle
int | float
Rotation angle in degrees.
IsClockwise
bool
If
True, rotate clockwise; otherwise counterclockwise.Crop
bool
If
True, crop the image to remove empty regions after rotation.
- Return type:
None
Examples
>>> param = {'Angle': 30, 'IsClockwise': True, 'Crop': True} >>> rotation("781519d9-9063-4fb3-a392-8f27d837c6d4", param)
- PyJEM.femtus.process.image_filters(datasetid, body)¶
Apply image filters.
- Parameters:
datasetid (str) – The datasetid of the target.
body (dict) –
Dictionary specifying filter parameters.
⇒ See Image filters body items.
items
key
type
value
FilterType
str
Type of filter to apply (for example,
Gaussian).Sigma
float
Standard deviation for the Gaussian kernel. Applicable only when
FilterTypeis"Gaussian".
- Return type:
None
Examples
>>> param = {"FilterType": "Gaussian", "Sigma": 1.0} >>> image_filters("781519d9-9063-4fb3-a392-8f27d837c6d4", param)
- PyJEM.femtus.process.get_default_image_filters(datasetid, body)¶
Get default image filter results.
- Parameters:
datasetid (str) – The datasetid of the target.
body (dict) –
Dictionary specifying filter parameters.
⇒ See Default image filters body items.
items
key
type
value
FilterType
str
Type of filter to apply (for example,
Median).Size
int
Kernel or window size for the filter.
- Return type:
None
Examples
>>> param = {"FilterType": "Median", "Size": 3} >>> get_default_image_filters("781519d9-9063-4fb3-a392-8f27d837c6d4", param)
- PyJEM.femtus.process.projection(body)¶
Project data.
- Parameters:
body (dict) –
Dictionary specifying projection parameters.
⇒ See Projection body items.
items
key
type
value
Type
str
Type of projection to apply.
Axis
str
Axis along which to project. One of
"X","Y","Z".- Return type:
None
Examples
>>> param = {"Type": "Sum", "Axis": "Y"} result = projection(param)
- PyJEM.femtus.process.spectrum_first_derivative(body)¶
Calculate the first derivative of a spectrum.
- Parameters:
body (dict) –
Dictionary containing the input data.
⇒ See Spectrum first derivative body items.
items
key
type
value
Data
list[float]
List of numerical values representing the spectrum signal.
- Return type:
None
Examples
>>> param = {"Data": [1, 2, 3, 4]} >>> spectrum_first_derivative(param)
- PyJEM.femtus.process.spectrum_second_derivative(body)¶
Calculate the second derivative of a spectrum.
- Parameters:
body (dict) –
Dictionary containing the input data.
⇒ See Spectrum second derivative body items.
items
key
type
value
Data
list[float]
List of numerical values representing the spectrum signal.
- Return type:
None
Examples
>>> param = {"Data": [1, 2, 3, 4]} >>> spectrum_second_derivative(param)