adjtomo / pysep

Seismogram Extraction and Processing: Seismic data retrieval and record sections
https://pysep.readthedocs.io
MIT License
29 stars 15 forks source link

Pysep legacy_naming flag for MTUQ #129

Closed SeismoFelix closed 9 months ago

SeismoFelix commented 11 months ago

Hi Bryant,

I added in the config file (yaml), the flags:

legacy_naming: true write_files: inv,event,stream,sac,weights_code

I got to write the weights.dat files, but not so writing the SAC files for being used directly with MTUQ. When reading the parameters (yaml) file, Pysep gives me the following warning:

pysep - WARNING: config parameter 'legacy_naming' not explicitely used by PySEP. adding to kwargs

I am wondering if I am correctly declaring the flag for legacy_naming.

Thanks

PS. I guess your warning has a typo. It is explicitly :)

bch0w commented 11 months ago

Hi @SeismoFelix, good catch. At the moment, legacy_naming is a private internal variable (https://github.com/adjtomo/pysep/blob/devel/pysep/pysep.py#L535), so you will need to set your yaml file with:

_legacy_naming: True

I think this reflects that at the time of writing I didn't think this feature would get much attention. In a future update I will make it a bit more usable.

SeismoFelix commented 11 months ago

Perfect, it worked. Thanks a lot!

bch0w commented 11 months ago

Hi @SeismoFelix, in the latest version of PySEP (0.5.0) I dropped the leading underscore so you can now include

legacy_naming: True

in your parameter file. Can you update and try this out and see if it works for you?

SeismoFelix commented 11 months ago

I will. Still, sorry for the ignorance. Since I installed it via pip rather than cloning the code. Is there any command for updating the code or it is necessary to reinstall pysep again?

Thanks

bch0w commented 11 months ago

The Pip version is also up to date so I think this should work:

pip install --upgrade pysep-adjtomo
SeismoFelix commented 11 months ago

Sorry, Bryant. I forgot to go back with you. The modification you made for including the legacy_naming flag as an external variable in the configuration file worked. As far as I know, you can close this issue. Thanks for your help.