Closed kerim371 closed 1 year ago
There are four constructors for judiVector that probably should do the checks for at least Geometry's and data's t,nt,dt
. But I can't figure out the style that I need to do that. For example if I iterate through all the sources from OOC geometry and data to check dt,nt,t
that may be pretty slow (I guess) because the OOC data may be too big.
Base: 83.96% // Head: 76.11% // Decreases project coverage by -7.85%
:warning:
Coverage data is based on head (
ae792bd
) compared to base (b17e604
). Patch coverage: 94.02% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Thanks. Will have a look asap. SEG conference in a week so bit too busy but not forgetting about it.
Thanks. Will have a look asap. SEG conference in a week so bit too busy but not forgetting about it.
Good luck there! The PR may wait, it is not much important.
I tried to follow ypur recommecndations.
Please check check_geom
function. Does it need to be exported? And if Julia allows to call function that is not implemented yet (if it is implemented below the caller function) I would move check_geom
somewhere after judiVector
constructors.
Also could you tell me where I can put tests?
Does it need to be exported?
No it's an internal check so shouldn't be exported
I would move check_geom
to Geometry.jl
and everything should be properly ordered in term of definition.
For the tests I'd add one test in test_geometry
for the geometry construction and check_geom
and one test in test_judiVector
for the judiVector creation (and maybe add a check that makes sure it errors if not compatible)
If you don't mind, once you added the test I may push a commit myself to make the syntax a bit more julia-esque consistent with the rest of JUDI. But I can also do that after merging your PR if you prefer this to be only your commits.
If you don't mind, once you added the test I may push a commit myself to make the syntax a bit more julia-esque consistent with the rest of JUDI. But I can also do that after merging your PR if you prefer this to be only your commits.
I don't mind, that is completely fine.
I will add tests soon
I added test to test_judiVector.jl
I think testing check_geom
function will lead to code duplication: check_geom
only throws exception if geometry's ns != data's ns
Just gonna go ahead and merge I can clean it up later.
When doing forward modeling sometimes we want to set geometry from SEGY and arbitrary
dt,nt
. This allows to explore the same model with different time length without modifying SEGY. To provide such opportunity opt argsdt,t
added to OOC Geometry constructors.getIndex
was modified to pass these parameters as args. When loading OOC geom to IC we now copydt,nt,t
from OOC rather than getting it from SEGY.With this we now need to make checks in
judiVector
in case the user sets geom that doesn't corresponds to data (data is needed for migration/inversion)