You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The modified Party object after running (client_)lag_calc cannot be written to file correctly in the develop version. The write function just write the original catalog to file, without containing the modified picks and there is no comments in the picks. However, the master version works as expected.
To Reproduce
Switch to the develop version
Running (client_)lag_calc on a Party object.
Save Party with party.write("x.tgz") in the default tar format.
Read the party from file party_read=Party().read("x.tgz")
Compare the object before writing to file (party[0][0].event.picks) and the one recovered from file party_read[0][0].event.picks
Switch to the master version and do the above steps
Expected behavior
The modified picks should be written to file.
Desktop (please complete the following information):
Operating System: Ubuntu 24.04.1
Python version: 3.10
EQcorrscan version: 0.5.0.dev
Additional context
A related question: reading a party larger than 100M is extremely slow, how can I accelerate the reading process? Currently I first convert my catalog to a pandas dataframe and then save it to a csv file, but it cannot be used to directly recover the original state of the party.
The text was updated successfully, but these errors were encountered:
zhong-yy
changed the title
Updated picks created by lag_calc are be written to file in the develop version
Updated picks created by lag_calc are written to file in the develop version
Dec 14, 2024
zhong-yy
changed the title
Updated picks created by lag_calc are written to file in the develop version
Updated picks created by lag_calc are not written to file in the develop version
Dec 14, 2024
Reading and writing large catalog objects is very slow, which is the main pinch point in reading and writing Party objects. Your best bet is to pickle your parties:
import pickle
with open("party.pkl", "wb") as f:
pickle.dump(party, f)
I usually write one party per data chunk to make it easier to read lots in.
The issue with different picks in develop relates to an update to the Family.catalog property in develop, which did not properly check for changes to detections. This should be patched in #601
Describe the bug
The modified
Party
object after running(client_)lag_calc
cannot be written to file correctly in the develop version. Thewrite
function just write the original catalog to file, without containing the modified picks and there is no comments in the picks. However, the master version works as expected.To Reproduce
(client_)lag_calc
on a Party object.Party
withparty.write("x.tgz")
in the default tar format.party_read=Party().read("x.tgz")
party[0][0].event.picks
) and the one recovered from fileparty_read[0][0].event.picks
Expected behavior
The modified picks should be written to file.
Desktop (please complete the following information):
Additional context
A related question: reading a party larger than 100M is extremely slow, how can I accelerate the reading process? Currently I first convert my catalog to a pandas dataframe and then save it to a csv file, but it cannot be used to directly recover the original state of the party.
The text was updated successfully, but these errors were encountered: