-
-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/issue/44 #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Feature/issue/44 #51
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use Depends scons method to explicit declare dependencies to scons
Changes pefInterpolation function calling from fullInterpolationAndStack experiments. The pefInterpolation.py recipe is now part of official Madagascar package. Because of that, SConstruct can call it from local Madagascar installation.
Error report function was deleted from official repository because it makes building and error report slow. Use python logging functions to report errors in SCons
The building of the experiment is splitted in several SConscripts. Concatenate all the building steps in one SConstruct. And use the Madagascar recipes 'kimodel.py' and 'pefInterpolation.py'. Those recipes are available in the official Madagascar package repository on github. Because of that they can be called from SConstruct.
Because those recipes are available in Madagascar package it is no longer require to store a copy of then in this repository
Define explicit dependencies to the experiments in multiLayerModel with Depend method in scons to avoid errors in parallel building, Resolve #44
The atexit will launch the after_build function that calls os.system commands to remove rsf temporary files. And establish the datacube and multiLayerDataCube as a stacked section dependency
Do a simple test of the experiments and SConstruct building for a couple of (m0,t0) pairs
As referenced in bug report #49, aperture parameter should be the same for the programs sfcrestack and sfgetcregather to avoid building errors in the stacking. Aperture parameter is the number of offsets to consider in the cre trajectory for sfgetcregather and the number of offsets to stack in sfcrectack. This parameter was introduced in sfgetcregather program to correct bug #38
The stacked section depends of the creGatherTraces and creStackedTraces too. So, Establish both as stacked section dependencies
To avoid multiple buildings of modeling and PEF interpolation steps separate the modeling and interpolation in another directory
The variable 'file' was loaded before cre stacking loop. It used glob method to receive the stacked traces list available in the directory to sort and build the stacked section. The problem is if the variable is loaded before the loop, glob won't find any stacked traces, because they are not build already! So, in order to explicit tell scons to load 'files' variable after the loop, put the variable as an empty list and load the values during the for loop with append method
To avoid problems and mixed outputs separate the models in two folders
This SConstruct tracks the experiments execution and does an automatic report of then in latex. This is a simple test of the experiments with a few common offset gathers interpolated and a few cre stacked traces to build the stacked section
Use script 'clean.sh' to delete temporary files. The function AddPostAction will assure that clean.sh will be called after the 'interpolatedDataCube2.rsf' building
The 'test_modelBuild.py' file tun the unit tests of the modeling and PEF interpolation steps that will produce the input to the CRE stacking step. Run this test with: ~$ python -m unittest test_modelBuild
Tests of the experiments. Run with: ~$ python -m unittest test_experiments
This was
linked to
issues
Sep 20, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📤 Pull Request
Description
Establish explicit dependencies in experiments SConstructs to avoid errors during the building with multiple threads.
Test the building using Python unittest module in the files 'test_modelBuild.py' (modeling and PEF interpolation test) and 'test_experiments.py' (experiments test).
Use 'AddPostAction' SCons method and 'clean.sh' script to clean the temporary files after the building.
Update the directory tree to separate modeling and PEF interpolation step of CRE stacking
Resolve #44 and #45
Type of change
Add images bellow and additional context if needed
. ├── diagrams ├── experiments │ ├── fullInterpolationAndStack │ ├── fullInterpolationAndStackCDS │ ├── modelingAndPEFInterpolation │ │ ├── gaussianModel │ │ └── multiLayerModel │ └── multiLayerModel │ ├── cds │ └── cre ├── images └── TDD 12 directories. ├── fullInterpolationAndStack │ ├── kimodel.pyc │ └── SConstruct ├── fullInterpolationAndStackCDS │ └── SConstruct ├── modelingAndPEFInterpolation │ ├── gaussianModel │ │ ├── clean.sh │ │ ├── kimodel.py │ │ └── SConstruct │ ├── multiLayerModel │ │ ├── clean.sh │ │ ├── kimodel.py │ │ └── SConstruct │ └── test_modelBuild.py ├── multiLayerModel │ ├── cds │ │ └── SConstruct │ └── cre │ └── SConstruct ├── README.md ├── SConstruct └── test_experiments.py 8 directories, 15 files~$ python -m unittest test_modelBuildAnd:
~$ python -m unittest test_experiments