-
Notifications
You must be signed in to change notification settings - Fork 77
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
"Standard" directories, testing and Travis #15
Closed
Closed
Conversation
This file contains 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
So we've been working on the same thing 😂 more to learn about managing issues! |
Great! I'll check out the new version tonight. |
leewujung
added a commit
that referenced
this pull request
Dec 22, 2022
* create general structure of add_splitbeam_angle function * create simrad.py and start working on a check of the waveform and encode modes * rearange and improve logic for checking the encode and waveform modes * finish documenting functions in simrad and finalizing their outputs, incorporate new waveform/encode mode check into calibrate_ek and consolidate api * allow for 2 beam groups for waveform_mode=BB and add check_waveform_encode_mode to compute_Sv and compute_TS * move core split-beam angle functions to split_beam_angle.py, finish implementation of _get_splitbeam_angle_power_CW, _add_splitbeam_angle_to_ds, add an empty test suite for echodata.simrad, and start working on test_add_splitbeam_angle * make check_waveform_encode_mode return only the echodata group name corresponding to the encode mode * change test_add_splitbeam_angle so that it takes a list of echoview mat paths, construct a function that creates a numpy array from mat paths, and select echodata beam_group data in add_splitbeam_angle based on ds channel dims * add pulse_compression input to add_splitbeam_angle, implement (CW, complex) and (BB, complex, no pulse compression) options, and create tests for them * modify test_add_splitbeam_angle pytest parameters to account for data location, finish docstring for add_splitbeam_angle, drop beam wherever necessary * add comment at the top of test_consolidate.py specifying where the split-beam angle tests data exists * creat apply_mask function without implementing it * create general structure implementation of apply_mask * create first simple test for apply_mask with mock Dataset creation * create apply_mask paramter test for when mask is a list of DataArrays * change the function name validate_source_ds to validate_source_ds_da and allow it to handle a DataArray input, modify existing tests for validate_source_ds * create routines that check the input of apply_mask and form the inputs for the core method in apply_mask * allow get_mock_source_ds_apply_mask to produced delayed variables and add associated test in test_apply_mask * add code and parameters to test_apply_mask to test for a mask that is provided as a path * add tests for different fill_value types and accout for type(fill_value)=DataArray conflict with xr.where * correct docstring in _check_mode_input_without_data Co-authored-by: Wu-Jung Lee <[email protected]> * raise ValueError instead of RuntimeError in _check_mode_input_without_data * remove TODO in _check_mode_input_with_data_EK60 * improve grammar in error output in _check_mode_input_with_data_EK80 Co-authored-by: Wu-Jung Lee <[email protected]> * remove check for EK80-like sensors in _check_mode_input_with_data_EK80 as it is not necessary * improve docstring function description for add_splitbeam_angle Co-authored-by: Wu-Jung Lee <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove States in pulse_compression docstring description Co-authored-by: Wu-Jung Lee <[email protected]> * improve logic associated with split-beam angle function calls in add_splitbeam_angle Co-authored-by: Wu-Jung Lee <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove remnant else statement caused by GH commit in add_splitbeam_angle * rename _check_mode_input_without_data to _check_input_args_combination * add reminder to add a test for _check_input_args_combination * change _check_mode_input_with_data_EK60/EK80 to _retrieve_correct_beam_group_EK60/EK80 * rename check_waveform_encode_mode to retrieve_correct_beam_group * finish constructing test_check_input_args_combination * remove reference to MVBS for ds input in add_splitbeam_angle function Co-authored-by: Wu-Jung Lee <[email protected]> * rename ds to source_Sv in add_splitbeam_angle * allow source_Sv to be a Dataset, str, or pathlib.Path * add return_dataset argument to add_splitb_ang and modify _add_splitbeam_angle_to_ds so that it will write the data to a zarr or netcdf, if necessary * remove auto chunking when opening a Dataset since netcdf files have issues with this and free resources linked to ds in _add_splitbeam_angle_to_ds as netcdf also has an issue if the file remains open * modify test_add_splitbeam_angle to allow writing ds_Sv to a file and add associated test parameters * raise not implemented error if source_Sv corresponds to MVBS * implement split-beam angle calculation for waveform_mode=BB, encode_mode=complex, and pulse_compression=False, and add corresponding test * Improve documentation by clarifying statements Co-authored-by: Wu-Jung Lee <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove whitespace caused by GH commit * replace RuntimeError with ValueError * replace chunks=auto with chunks={} * add default value to apply_mask input var_name and modify documentation accordingly * Fix meta_source_filenames bug and enable (meta)source_filenames appending of path and list (#908) * Expand prov.source_files_vars to support path sequences that mix a str/path and another sequence * For EK80, ES70, ES80, EA640, conversion was inserting an unnecessary, empty meta_source_filenames variable * Add more comprehensive and readable prov source-files type hints; rename _source_files * Fix prov type hint bug with Py 3.8 * Add unit test for prov _sanitize_source_files; plus small fixes to np.ndarray type references in prov * fix validate_source_ds to validate_source_ds_da * improve Notes section in docstring for add_splitbeam_angle Co-authored-by: Wu-Jung Lee <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * clarify when the split-beam angle data potentially exist Co-authored-by: Wu-Jung Lee <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix long lines * Add clarification in NotImplemented error statement Co-authored-by: Wu-Jung Lee <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * split up line in NotImplemented error statement * rename function compute_split_beam_beamtype1 to _e2f * put radian to degree conversion on one line Co-authored-by: Wu-Jung Lee <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * change sin to arcsin Co-authored-by: Wu-Jung Lee <[email protected]> * remove unnecessary statement Co-authored-by: Wu-Jung Lee <[email protected]> * replace RuntimeError with ValueError * change theta_fc --> theta and phi_fc --> phi * allow splitbeam calculation for power and CW options when beam_type is not equal to zero * replace core functions in _get_splitbeam_angle_complex_CW with get_splitbeam and then remove them * shorten function names, minor docstring tweaks * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add TODO to test * fix bug in logic for at least 1 channel being split-beam Co-authored-by: b-reyes <[email protected]> Co-authored-by: b-reyes <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Emilio Mayorga <[email protected]>
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.
I took one step towards the "standard" directory structure, including unit testing and Travis integration (issue #4). It requires a big shuffling of all of the code, so it is somewhat disruptive.
To run the tests, you must manually download
Y1801_EK60-D20180211-T164025.raw
into the test/data/ directory (see comment on issue #5 (comment))For simple testing, run "pytest" from the top level.