hypoDDpy
hypoDDpy copied to clipboard
Possible issue with writing of cross-correlation differential times to dt.cc
I think that the differential times written to dt.cc may not be computed correctly. As per the hypoDD 2.1 manual, dt's in the dt.cc file should be event1 - event2 (T1 - T2), it appears that you have done event2 - event1. So line 1101-1103 should be (I think) -
diff_travel_time = ((pick_1["pick_time"] - event_1_dict["origin_time"]) -
(pick_2["pick_time"] + pick2_corr - event_2_dict["origin_time"]))
Can you please check this? It makes a big difference.
Hi @krischer, I've got the same question. Is it possible that this should be swapped to what @StevenSewell83 has suggested above?
Similarly, I'm just wondering if you have received the following error when running _cross_correlate_picks?
Traceback (most recent call last): |ETA: --:--:--
File "run_relocator.py", line 26, in <module>
relocator.start_relocation(output_event_file="bowen/relocated_events.xml")
File "/home/u58888/hypoDDpy-master/hypoddpy/hypodd_relocator.py", line 135, in start_relocation
self._cross_correlate_picks(outfile=output_cross_correlation_file)
File "/home/u58888/hypoDDpy-master/hypoddpy/hypodd_relocator.py", line 1081, in _cross_correlate_picks
all_cross_correlations.append((pick2_corr,
UnboundLocalError: local variable 'pick2_corr' referenced before assignment
Any ideas on how to fix this issue? Thanks.
Similarly, I'm just wondering if you have received the following error when running _cross_correlate_picks?
Dear Gb, Did you solve the issues? I have the same problems. if you have solved and found any ideas please share with us. Best
@StevenSewell83 @cjhopp Yes, I checked again and, if I'm not wrong, this makes sense arithmetically. It is also apparent when you try to use the dt.cc produced by hypoDDpy, as opposed to when you change the sign of all travel times. I will fix it.
@StevenSewell83 @cjhopp In case you are still interested, I fixed it. Please let me know if you use it and find out that I'm still missing something.
Hi @gb24 and @Ganzorig8181 . I have never encountered this, but if it is still relevant to you, I can give it a try. Otherwise we may close the issue.