Skip to content

Commit

Permalink
fix: incorrect if statement for manual depth range
Browse files Browse the repository at this point in the history
fix: incorrect if statement for manual depth range
  • Loading branch information
versey-sherry authored Nov 10, 2021
2 parents c0c07ea + 8337b37 commit 1197be1
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 75 deletions.
29 changes: 29 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--- Provide a general summary of your changes in the Title above -->
<!--- Pull request titles must use the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) format -->

## Issue being fixed or feature implemented
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->


## What was done?
<!--- Describe your changes in detail -->


## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->


## Breaking Changes
<!--- Please describe any breaking changes your code introduces and verify that -->
<!--- the title includes "!" following the conventional commit type (e.g. "feat!: ..."-->


## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
82 changes: 9 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@

[![codecov](https://codecov.io/gh/dattalab/moseq2-extract/branch/test-suite/graph/badge.svg?token=ICPjpMMwYZ)](https://codecov.io/gh/dattalab/moseq2-extract)

Welcome to moseq2, the latest version of a software package for mouse tracking in depth videos first developed by Alex Wiltschko in the Datta Lab at Harvard Medical School.
# [Documentation: MoSeq2 Wiki](https://github.com/dattalab/moseq2-app/wiki)
You can find more information about MoSeq Pipeline, installation, step-by-step instructions, documentation for Command Line Interface(CLI), tutorials etc in [MoSeq2 Wiki](https://github.com/dattalab/moseq2-app/wiki).

Latest version is `0.7.0`

***

## Features
Below are the commands/functionality that moseq2-extract currently affords.
They are accessible via CLI or Jupyter Notebook in [moseq2-app](https://github.com/dattalab/moseq2-app/tree/release).
You can run `moseq2-extract --version` to check the current version and `moseq2-extract --help` to see all the commands.
```bash
Usage: moseq2-extract [OPTIONS] COMMAND [ARGS]...

Expand All @@ -33,69 +28,10 @@ Commands:
generate-index Generates an index YAML file containing all extracted...
```

### CLI Exclusive Functions
```bash
batch-extract Batch processes all the raw depth recordings located...
convert-raw-to-avi Converts/Compresses a raw depth file into an avi file...
copy-slice Copies a segment of an input depth recording into a...
```

### GUI Exclusive Function
```bash
extract_found_sessions() Extracts all found data within a given input_dir,
AND searches for individual session configuration parameters in the session_config.yaml
```
Run any command with the `--help` flag to display all available options and their descriptions.
***
## Documentation
MoSeq2 uses `sphinx` to generate the documentation in HTML and PDF forms. To install `sphinx`, follow the commands below:
```.bash
pip install sphinx==3.0.3 sphinx_click==2.5.0
pip install sphinx-rtd-theme
pip install rst2pdf
```
All documentation regarding moseq2-extract can be found in the `Documentation.pdf` file in the root directory,
an HTML ReadTheDocs page can be generated via running the `make html` in the `docs/` directory.
To generate a PDF version of the documentation, simply run `make pdf` in the `docs/` directory.
For information on getting started, check out the [MoSeq Roadmap](https://github.com/dattalab/moseq2-docs/wiki).
***
## Examples
### Example `find-roi` Outputs
#### Round Arena ROI and Background
![alt text](media/plt_example.png)<br><br>
#### Y-Maze Arena (from Kinect v2 Camera)
![alt text ](media/found_arena.png)
#### Convex-shaped Bucket (\\_/) (from Azure Camera)
Dilated Background and ROI respectively.
![alt text](media/bg_roi_dilated.png)
![alt text](media/roi_dilated.png)
#### Rectangular Arena (from RealSense)
ROI and Weighted Background Image respectively.
![alt text](media/rs_roi_example.png)
### Example Extraction
![alt text](media/good_recording.gif)
***
## Contributing

If you would like to contribute, fork the repository and issue a pull request.
# Community Support and Contributing
- Please join [![MoSeq Slack Channel](https://img.shields.io/badge/slack-MoSeq-blue.svg?logo=slack)](https://moseqworkspace.slack.com) to post questions and interactive with MoSeq developers and users.
- If you encounter bugs, errors or issues, please submit a Bug report [here](https://github.com/dattalab/moseq2-app/issues/new/choose). We encourage you to check out the [troubleshooting and tips section](https://github.com/dattalab/moseq2-app/wiki/Troubleshooting-and-Tips) and search your issues in [the existing issues](https://github.com/dattalab/moseq2-app/issues) first.
- If you want to see certain features in MoSeq or you have new ideas, please submit a Feature request [here](https://github.com/dattalab/moseq2-app/issues/new/choose).
- If you want to contribute to our codebases, please check out our [Developer Guidelines](https://github.com/dattalab/moseq2-app/wiki/MoSeq-Developer-Guidelines).
- Please tell us what you think by filling out [this user survey](https://forms.gle/FbtEN8E382y8jF3p6).
2 changes: 1 addition & 1 deletion moseq2_extract/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.8.1"
__version__ = "v1.0.1beta"
2 changes: 1 addition & 1 deletion moseq2_extract/helpers/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def get_roi_wrapper(input_file, config_data, output_dir=None):
write_image(join(output_dir, 'bground.tiff'), bground_im, scale=True)

# readjust depth range
if config_data.get('manual_set_depth_range', False):
if not config_data.get('manual_set_depth_range', False):
# search for depth values between the max distance and the halfway point to the camera
print('Automatically setting depth range. To manually set range values,'
' set "manual_set_depth_range" to True.\n For CLI users: use the --manual-set-depth-range flag.')
Expand Down

0 comments on commit 1197be1

Please sign in to comment.