clear bug in bundle algorithm #216
Replies: 5 comments 2 replies
-
I think the problem is because that the mspass/python/mspasspy/db/database.py Lines 2162 to 2187 in eda52f2 Note that the reader doesn't have the problem because we explicitly construct the tmatrix from dict in the constructor at this line: mspass/cxx/src/lib/seismic/CoreSeismogram.cc Line 121 in 99a8ac3 Anyway, @haruming could you please fix it? Thank you! |
Beta Was this translation helpful? Give feedback.
-
I just noticed another problem that should be fixed @haruming while you are adding the two boolean attributes to the schema for wf_Seismogram. The current contents are:
That is alright IF the list type is enforced. Note that for wf_TimeSeries the same attribute name is not a list but a single ObjectID. I actually think it is really bad form to have the same attribute name used for data with different types. Furthermore, the more important issue is that the recommended normalization collection for wf_Seismogram is site not channel. The list of channels can, for example, be misleading if any coordinate transformation is done. I think we can keep a list of channel_id values as an option but it must have a different name and we need to provide for site_id. In short, I advise we change the yaml file section above to this (including proposed names for the two booleans:
|
Beta Was this translation helpful? Give feedback.
-
On Jul 2, 2021, at 12:36 AM, Will Yang ***@***.******@***.***>> wrote:
This message was sent from a non-IU address. Please exercise caution when clicking links or opening attachments from external sources.
This is an interesting bug and glad we have a solution right now. But two things I am confused about are:
1. in the yaml file section, both cardinal and orthogonal have the reference attribute -> 'site', but the site collection in the yaml file doesn't include these two boolean attributes. Should we have those in the site collection?
That is an error in what I put in the yaml file if i has that. Both belong only in wf_Seismogram. My mistake
1. Correct me if I am wrong, we should also set both the cardinal and orthogonal attributes in the metadata when we are saving or updating the mspass_object, just like what we would do for the matrix.
Yes, set cardinal and orthogonal when the document is loaded into Metadata. When that exists let me fix the Metadata constructor in the C++ code to use them. My recollection is the read_data method calls the Metadata constructor to create the object. I will double check that when you get this implemented so treat that as my problem to solve.
BTW, I would probably finish fixing this bug by Friday evening.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#216 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AABNEJZ7CBVIJJP37SEHZOTTVU65XANCNFSM47TDTHXQ>.
|
Beta Was this translation helpful? Give feedback.
-
just a note here. The constructor will set those two variables: mspass/cxx/src/lib/seismic/CoreSeismogram.cc Lines 123 to 126 in 82d6582 If you want to set them in the reader, it should overwrite the ones set by constructor. |
Beta Was this translation helpful? Give feedback.
-
@pavlis Weiming noted an issue when implementing above. The |
Beta Was this translation helpful? Give feedback.
-
Working on the notebooks for the upcoming short course I uncovered an unambiguous bug in how we are handling three component data save and read. I'd handle it but I need a little help to fix it.
The issue is that we are losing the transformation matrix. I am encountering this problem when this little block of code is executed:
The function bundle_seed_data does what I think it should do and sets the transformation matrix internally. The problem is in save_ensemble_data, which is mostly a loop over the members calling save_data for each. When I look at the code I do not see it handling the transformation matrix. Recall we put this attribute in the schema to handle this:
where the lists is to be the 9 components of the transformation matrix. Side issue: the yaml file should specify the order the components should appear.
We definitely aren't handling this right. I find nothing in the database.py related to this issue. This is definitely a problem we need to fix immediately as it pretty much invalidates any Seismogram processing.
Some elements of what we have to fix:
Beta Was this translation helpful? Give feedback.
All reactions