Open rdno opened 7 years ago
Hi Ridvan,
You are saying that:
1) time shift is set to be 1.5*hdr in my code(in any case);
2) However, if the interp_flag
is set to be false, then there is no zero-padding and thus the time information is incorrect.
Good catch, I will fix it very soon.
Also, I am thinking about when processing the adjoint source, the starttime should be passed explicitly, for example, we can give the starttime of raw synthetic seismogram, rather than using the hard-coded 1.5*hdr
since if there is something changed in specfem about the starttime, it will be another bug.
Also, since there are some bugs buried in the pypaw, I am thinking about refactoring pytomo3d
and pypaw
, moving all processing function calls to pytomo3d so it will have full test coverage.(Testing pypaw now is difficult because it involves some parallel environment.) Pytomo3d is very easy to set up the test because it uses very simple data structure.
So it would be great if you can also help to write some tests and add test data to pytomo3d based on your current comparison.
Let me know.
Hi Ridvan,
I think you also mentioned there are some issues on pyflex. If so, could you create issues at that page here? https://github.com/wjlei1990/pyflex/issues
Hi,
Hopefully, when I am done comparing the python tools with fortran tools, they will provide useful test cases. I want to understand the systems and procedures a little better before I start to contribute in a bigger way.
For pyflex, We had an idea for possible explanation of a missing window. I have to test that before I am sure.
Hi Ridvan,
It would be great value if you can provide some solid test cases. So I can add more test in the code.
I have one suggestion, would you mind if we setup a repo on github and host some seismogram and test cases so I can also get access to the data you used?
Also, let me know about the pyflex status.
Hi,
While generating an adjoint source, if the input data starts at t=0 and interp_flag is off, time offset is set to -1.5*hdr. However, pytomo3d does not do any zero padding unless the interp_flag is True. This causes tıme shift in the output.
I decided to open this issue here because pypaw sets the time_offset in the asdf file. But maybe it can be fixed in pytomo3d by checking if the input starttime is different than interp_starttime. So, It can decide to do padding if necessary.
I hope it is clear. Links to the relevant parts are below: pypaw/adjoint.py pytomo3d/adjoint/process_adjsrc.py