autopew.io.laser.chromium¶
Import and export functions for the Chromium Laser Ablation Navigation Software.
autopew.io.laser.chromium.
get_scandata
(scandict)[source]¶Process a dictionary of scan information into a
DataFrame
.
Parameters: scandict ( dict
) – Dictionary of scan data.Returns: Return type: pandas.DataFrame
See also
ScanData
autopew.io.laser.chromium.
read_lasefile
(filepath, encoding='cp1252')[source]¶Read a .lase formatted file into a dictonary (one item per scan), and return this in the form of a
DataFrame
.
Parameters:
- filepath (
str
,pathlib.Path
) – Path to the .lase file to import.- encoding (
str
) – File encoding of the .lase file.Returns: Return type: Notes
.lase files have all spot information as well as gas flows and all control options of laser operation. These are configuration files structured by blocks demarkated with square brackets, along the lines of:
[Scans] Header=Scan Type,Description, ... Scan0=Spot,"Spot 1", ... [<other control blocks>] ...Some of the values in this table are string-encoded tuples (e.g. “57950.00,37530.00,20734.50”) and dictionaries (e.g. “Dosage=1;DwellTime=1.00;LineSpacing=100.00;Laser.Output=10.00;…”).
See also
ScanData
,get_scandata()
autopew.io.laser.chromium.
read_scancsv
(filepath, encoding='cp1252')[source]¶Read a .scancsv into a dictonary (one item per scan), and return this in the form of a
DataFrame
.
Parameters:
- filepath (
str
,pathlib.Path
) – Path to the .scancsv file to import.- encoding (
str
) – File encoding of the .scancsv file.Returns: Return type: Notes
.scancsv files only contain spot information and do not edit the laser and gas conditions. These are essentially comma-separated values files, with a structure along the lines of:
Scan Type,Description, ... Spot,"Spot 1", ...Some of the values in this table are string-encoded tuples (e.g. “57950.00,37530.00,20734.50”) and dictionaries (e.g. “Dosage=1;DwellTime=1.00;LineSpacing=100.00;Laser.Output=10.00;…”).
See also
ScanData
,get_scandata()
autopew.io.laser.chromium.
split_config
(s)[source]¶Splits a config-formatted string.
Parameters: s ( str
)Returns: Return type: dict
See also
autopew.io.laser.chromium.
write_scancsv
(df, filepath=PosixPath('exportedpoints.scancsv'), spotnames=None, encoding='cp1252', z=20800, **kwargs)[source]¶Export an array of coordinates to a .scancsv file.
Parameters:
- df (
pandas.DataFrame
) – Dataframe containing points to serialise.- filepath (
str
|pathlib.Path
) – Filepath for export.- spotnames (
str
|list
) – Name to prefix spot indicies or a list of spot names.- encoding (
str
) – Encoding for the output file.- z (
int
) – Optional specification of default focus value to use.Returns: Return type: