-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added apps clean, extract, header and moved some config to toml
- Loading branch information
Showing
11 changed files
with
246 additions
and
173 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = sigpyproc | ||
version = 1.0.0 | ||
version = 1.1.0 | ||
author = Ewan Barr | ||
author_email = [email protected] | ||
maintainer = Pravir Kumar | ||
|
@@ -31,6 +31,7 @@ install_requires = | |
scipy | ||
bottleneck | ||
attrs | ||
click | ||
rich | ||
bidict | ||
iqrm | ||
|
@@ -40,6 +41,8 @@ install_requires = | |
console_scripts = | ||
spp_header = sigpyproc.apps.spp_header:main | ||
spp_decimate = sigpyproc.apps.spp_decimate:main | ||
spp_extract = sigpyproc.apps.spp_extract:main | ||
spp_clean = sigpyproc.apps.spp_clean:main | ||
|
||
[options.extras_require] | ||
tests = | ||
|
@@ -74,7 +77,7 @@ ignore = | |
Q0, | ||
# WPS | ||
WPS100, WPS110, WPS114 | ||
WPS210, WPS220, WPS237, | ||
WPS210, WPS216, WPS220, WPS237, | ||
WPS305, WPS323, WPS338, WPS339, WPS345, WPS352, WPS362 | ||
WPS420, WPS432, WPS440, WPS441, | ||
WPS519, | ||
|
@@ -114,31 +117,3 @@ rst-roles = | |
docstring_style=numpy | ||
ignore=DAR402,DAR103,DAR201,DAR101 | ||
|
||
|
||
[tool:pytest] | ||
minversion = 6 | ||
testpaths = tests | ||
|
||
[coverage:run] | ||
omit = | ||
*setup.py | ||
*__init__.py | ||
*tests* | ||
*docs* | ||
*apps* | ||
*sigpyproc/core/kernels.py | ||
|
||
[coverage:report] | ||
show_missing = True | ||
ignore_errors = True | ||
#fail_under = 85 | ||
exclude_lines = | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
[coverage:paths] | ||
source = ./ | ||
|
||
[mypy] | ||
ignore_missing_imports = True | ||
plugins = numpy.typing.mypy_plugin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import click | ||
|
||
from sigpyproc.readers import FilReader | ||
|
||
|
||
@click.command( | ||
context_settings=dict(help_option_names=["-h", "--help"], show_default=True) | ||
) | ||
@click.argument("filfile", type=click.Path(exists=True)) | ||
@click.option( | ||
"-m", | ||
"--method", | ||
type=click.Choice(["mad", "iqrm"]), | ||
default="mad", | ||
help="RFI cleaning method to use.", | ||
) | ||
@click.option( | ||
"-t", "--threshold", type=float, default=3.0, help="Sigma threshold for RFI cleaning." | ||
) | ||
@click.option( | ||
"-g", "--gulp", type=int, default=16384, help="Number of samples to read at once" | ||
) | ||
@click.option( | ||
"-o", "--outfile", type=click.Path(exists=False), default=None, help="Output filename" | ||
) | ||
def main(filfile: str, method: str, threshold: float, outfile: str, gulp: int) -> None: | ||
"""Clean RFI from filterbank data.""" | ||
fil = FilReader(filfile) | ||
fil.clean_rfi(method=method, threshold=threshold, outfile=outfile, gulp=gulp) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import click | ||
|
||
from sigpyproc.readers import FilReader | ||
|
||
|
||
@click.command( | ||
context_settings=dict(help_option_names=["-h", "--help"], show_default=True) | ||
) | ||
@click.argument("filfile", type=click.Path(exists=True)) | ||
@click.option( | ||
"-s", "--start", type=int, default=0, help="Start time sample" | ||
) | ||
@click.option( | ||
"-n", "--nsamps", type=int, help="Number of time samples to extract" | ||
) | ||
@click.option( | ||
"-g", "--gulp", type=int, default=16384, help="Number of samples to read at once" | ||
) | ||
@click.option( | ||
"-o", "--outfile", type=click.Path(exists=False), default=None, help="Output filename" | ||
) | ||
def main(filfile: str, start: int, nsamps: int, gulp: int, outfile: str) -> None: | ||
"""Extract time samples from filterbank data.""" | ||
fil = FilReader(filfile) | ||
fil.extract_samps(start=start, nsamps=nsamps, outfile=outfile, gulp=gulp) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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
Oops, something went wrong.