-
Notifications
You must be signed in to change notification settings - Fork 12
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
v2_ssp_func #54
v2_ssp_func #54
Conversation
Thanks Kris! Only five additional lines is perfect 😆 . Not sure I'll have time this week to review the PR, but I'll certainly work on it next week! |
Hi Kris, I made some modifications:
The main problem was that I think that we should reflect on whether we want Anyway, we can keep this change for later, since it is quite a major one. Other point: it is not clear to me why Finally, to test the code, you have to force-pull, since I rebased. |
Claudio, I force-pulled the branch and my notebook still works!
|
Thanks for the feeback. I'm going to merge this one and start working on reorganize the setup and read input part of the code into subdirectories. I'll also take care of the two It would be nice if you could send me a working script or notebook to test the API all along the modifications 😉 |
…new select_components and augment_traces functions. Moved code from read_traces function to new read_station_inventory, read_event_and_picks and augment_event functions.
Since the `event` object might not be yet in the `config` object.
Claudio, thanks. |
For the moment, just send me an email or a transfer link? We will see later what to include as an offical example 😉 |
Kris, please take a look at these two commits:
This will require some adjustment on your side 😉 |
I further moved all the input functions into an Also, I moved |
You are doing quite a bit of refactoring, but it looks good! |
Claudio,
Here is my first attempt to reorganize sourcespec in a way that it can be run as a function.
I don't think I wrote more than 5 new lines, but most of the changes consisted of moving existing code to new functions:
ssp_setup.py
I added a newget_outdir_path
functionssp_read_traces.py
I added newread_station_inventory
,read_event_and_picks
,augment_event
,augment_traces
andselect_components
functionssource_spec.py
, I added newssp_run
andssp_output
functionsI haven't been able to test it yet. I will need to modify my own code quite substantially before that will be possible, but I will first try writing a simple notebook to see if I can make it work.
You will probably want to organize the new functions in different files. Also,don't hesitate if you want to change the names of these new functions.
In some places, I added some TODO lines regarding alternative decisions that could be taken or questions that I have.
If you have time, please have a look and let me know if this makes sense.
Kris