UFMConverter.ufm_to_square_csvs#
- UFMConverter.ufm_to_square_csvs(ufm, csv_name, decimal_places=5, overwrite=True)[source]#
Convert UFM to separate square CSVs for each level.
Dumps UFM to stacked square CSV and then splits that into separate CSVs for each level.
- Parameters:
ufm (Path) – Path to UFM file.
csv_name (str) – Base name for CSV files to output, ‘-level_N.csv’ will be appended to each.
decimal_places (int) – Number of decimal places for SATURN to export to CSV, more decimal places can sometimes break SATURN’s CSV export functionality. Defaults to 5.
overwrite (bool) – Default True, if the CSV exists already it will be deleted before running. If False an error will be raised.
- Returns:
pathlib.Path – Path to CSV containing full stacked matrices.
list[pathlib.Path] – Paths to the CSVs which contain each level.
- Raises:
FileNotFoundError – If the UFM file doesn’t exist or the CSV file isn’t exported from SATURN.
FileExistsError – If the CSV file already exists and overwrite is False.
- Return type:
See also
ufm_to_csv()for conversion to other CSV formats.