Skip to content

Conversation

mp-emrld
Copy link
Contributor

@mp-emrld mp-emrld commented May 2, 2022

Did some minor modifications, so that Aarhus Workbench can read the xyz-data and alc-file written with libaarhus.dump(...)
Might be a bit ugly but is working. Feel free to change the coding to be more "pythonic" ;-).

Did the following modifications:

  • all channel/gate related information in .alc file must end on Gate_Ch01_45 not Gate_Ch01_[44].
  • the first gate channel must be numbered with 01 not 00 (like Gate_Ch01_01 instead of Gate_Ch01_[00]).
  • The xyz file must only have 1 header line, when input to AarhusWorkbench, so data['model_info'] must be skipped and not written to file.


def _dump(data, file, alcfile=None):
df = _un_split_layer_columns(data)
for key, value in data['model_info'].items():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd propose adding separate argument skip_header or somesuch, as this throws away info in a non-obvious way?

def _dump(xyz, f, columns=None):
if columns is None:
columns = xyz["file_meta"]["columns"]
else:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe split this into a separate function?

columns = clean_column_names(columns)

@redhog
Copy link
Member

redhog commented May 16, 2022

A bit sceptical to including 9999 verbatim as a NaN value... Isn't this specified in a header in many xyz files? Possibly better to filter in the dataframe rather than in parsing maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants