Skip to content

Conversation

@ammcpherson
Copy link
Member

Hello,

I believe that at one point the weights files had 13 columns, and at some point this changed to only 12. I have updated the parse_statistics function to read in the proper columns for static time shifts.

Thanks,
Amanda

@rmodrak
Copy link
Member

rmodrak commented Oct 14, 2025

Can we generalize the weight file format and reader to accommodate different existing conventions?

Following discussion with others in 2020, I started using a 13 column weight file (introduced by Celso?) and still continue to use it

@ammcpherson
Copy link
Member Author

If the order never changes, we could do something akin to:

statics[_code]['surface_wave_Z'] = float(row[-2])
statics[_code]['surface_wave_R'] = float(row[-2])
statics[_code]['surface_wave_T'] = float(row[-1])

But I think that if we are encouraging people to use PySEP to download data, this will always fall victim to needing to be kept up to date with whatever changes happen there.

@ammcpherson
Copy link
Member Author

I have two more thoughts regarding this:

  1. The default data used in all the examples currently has a weights file with 12 columns, and has a header line describing what each column is. However, weights files written out by PySEP do not have this header.
  2. It is far easier for experienced users such as you and I, albeit still frustrating, to adapt our scripts and workflows to changes like these than new users.

I think that the long term solution is to ask for PySEP to write out a weights file with a descriptive header, such that we can write a function to read it in as a pandas DataFrame with column names, which would be about as generalized as I think it could be.

In the short term though, I think that we need to have this fixed for new users.

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.

2 participants