hypoDDpy icon indicating copy to clipboard operation
hypoDDpy copied to clipboard

Possible issue with writing of cross-correlation differential times to dt.cc

Open StevenSewell83 opened this issue 7 years ago • 6 comments

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.

StevenSewell83 avatar Jul 10 '17 02:07 StevenSewell83

Hi @krischer, I've got the same question. Is it possible that this should be swapped to what @StevenSewell83 has suggested above?

cjhopp avatar Aug 31 '17 02:08 cjhopp

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.

gb24 avatar May 30 '18 00:05 gb24

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

Ganzorig8181 avatar Feb 28 '22 16:02 Ganzorig8181

@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.

ogalanis avatar May 05 '23 11:05 ogalanis

@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.

ogalanis avatar May 05 '23 12:05 ogalanis

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.

ogalanis avatar May 05 '23 13:05 ogalanis