Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added station count in default header #263

Merged
merged 2 commits into from
May 15, 2024
Merged

Added station count in default header #263

merged 2 commits into from
May 15, 2024

Conversation

thurinj
Copy link
Member

@thurinj thurinj commented Apr 27, 2024

Here is an attempt at the least invasive change for the header station count. It is based of the existing helper function structure in the SourceHeader class with the addition of parse_station_counts.

It implements a way to count the total number of station, in case the body and surface waves were to be loaded from different weight file instances (in principle it should be rare, but that's an extra layer of precaution).

The next (and only) foreseeable change to the header would be the inclusion of an * modifier added to fixed parameters. This should easily be done with the help of the grid.shape attributes, but we currently don't have a clean way of adding the grid (if we want to be the default behavior, we would have to change the input parameters for plot_data_greens1 and plot_data_greens2).

Added a helper function on the model of the self.parse_xxx() function in the code. The code use the info from data_sw and data_bw if available, to compute the number of total stations, and non-empty stations on the fly to be displayed.
Added **kwargs input to `_prepare_header()` to easily pass data (typically `data_bw` / `data_sw`) for the default header modification. It will likely be a good option to pass other fields to the header (like the grid).
@thurinj thurinj requested a review from rmodrak April 27, 2024 06:29
@thurinj thurinj self-assigned this May 15, 2024
@thurinj thurinj merged commit efd572b into master May 15, 2024
1 check passed
@thurinj thurinj deleted the Header_modif branch September 30, 2024 01:27
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