Skip to content
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

Use common beam instead of beam averaging #656

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
1a4ce01
Switch avg -> common beam
e-koch Aug 15, 2020
208a68a
Update beam warning messages for common beam
e-koch Aug 15, 2020
1133a4e
Change test checks to ensure the common beam is being returned
e-koch Aug 15, 2020
9d88227
Add test beam set with similar areas
e-koch Aug 15, 2020
428e185
Looks like we had a duplicated function -> see base_class.py
e-koch Aug 21, 2020
928a51c
Separate beam area checks from avg beam and checks for bad beams; def…
e-koch Aug 21, 2020
7a55cf3
thresholds all default to VRSC.beam_threshold
e-koch Aug 21, 2020
f119270
Missed one threshold input
e-koch Aug 21, 2020
a821462
Alter test_mask_beam_beams to check for varying setting, but no opera…
e-koch Aug 21, 2020
51dc3ad
More information error message
e-koch Aug 21, 2020
90cc768
Add tests for failure and pass for spectral operation due to beam dif…
e-koch Aug 21, 2020
803468a
Make note for adding in beam area check for DaskVRSC (no checks right…
e-koch Aug 22, 2020
69f734d
Add new fixture to ALL_DATA_FIXTURES
e-koch Aug 22, 2020
8ad3259
Add extra attribute names to handle DaskVRSC w/ a beams check
e-koch Aug 25, 2020
cab4b3e
Add VRSC tests for beam checks that fail and pass
e-koch Aug 25, 2020
8cec35c
Remove to-do now handled directly in VRSC
e-koch Aug 25, 2020
0c5e9fb
Clean-up
e-koch Aug 25, 2020
e1a50a8
common beam operations require scipy
e-koch Aug 26, 2020
fe27f9a
Add back average beams, which now just passes to `set_common_beam` wi…
e-koch Aug 26, 2020
59c52b3
Add setting for a "strict" beam matching mode (i.e., threshold = 0.0 …
e-koch Aug 26, 2020
8b4c076
Add strict beam match mode test
e-koch Aug 26, 2020
b010653
Add checks for strict_beam_match in _check_beam_areas. Users will get…
e-koch Aug 26, 2020
a000f93
Need to specify axis=0 for spectral operations to trigger the beam ar…
e-koch Aug 26, 2020
ac848f3
Clean tests up; use common list of spectral operations
e-koch Aug 26, 2020
179ffbd
Add deprecation test for average_beams
e-koch Aug 26, 2020
aa4e61b
Extra self
e-koch Aug 26, 2020
9a3392f
Add a single line unit conversion example for VRSC
e-koch Aug 26, 2020
e8a9525
Update smoothing docs for new common beam operations
e-koch Aug 26, 2020
d7bc388
Add a bunch of common/bad beam handling text to the docs
e-koch Aug 26, 2020
2cc72f1
Add link to beam handling for common errors
e-koch Aug 26, 2020
24d6458
Just use **kwargs to pass to common beam algorithm
e-koch Aug 27, 2020
162d323
Change default common beam masking to just use goodbeams_mask; descri…
e-koch Aug 27, 2020
3191df5
Check for array mask first. Otherwise the == comparisons give a Futur…
e-koch Aug 27, 2020
2d8315b
Add test for different set_common_beam mask options
e-koch Aug 27, 2020
2dead55
Remove "combeam_kwargs"
e-koch Aug 27, 2020
0d1f6f2
Add unmasked_channels property to cache any(axis=(1,2)) calls on masks
e-koch Aug 28, 2020
f9eddca
Add test for `cube.unmasked_channels`
e-koch Aug 28, 2020
5f0bdf3
Need to make an approx comparisons for slightly different rounding in…
e-koch Aug 28, 2020
41d2110
Use unmasked_channels in set_common_beam
e-koch Aug 28, 2020
b80e990
Add _mask_include for all Dask cube types
e-koch Aug 28, 2020
5315641
Change default mask for deprecated average_beams
e-koch Aug 28, 2020
01cfc61
Fix wrong numpy testing function
e-koch Aug 28, 2020
ce99b95
Fix logic using unmasked_channels and separate da.Array checks
e-koch Aug 28, 2020
7776c03
Fix handling 3D masks
e-koch Aug 28, 2020
8c3b9ba
Minor docs comments from @keflavich
e-koch Sep 23, 2020
a9be9e8
Update docs/beam_handling.rst
e-koch Sep 23, 2020
bb39274
Update docs/beam_handling.rst
e-koch Sep 23, 2020
145a2bc
Update docs/beam_handling.rst
e-koch Sep 23, 2020
2156ea9
Small fixes from @astrofrog
e-koch Oct 5, 2020
400308c
Update docs/beam_handling.rst
e-koch Oct 5, 2020
3202da0
Allow for computing common beam on init; state set by initial data + …
e-koch Oct 15, 2020
70f2527
Add convenience functions for convolving to a common beam
e-koch Oct 15, 2020
a0be2b5
Add `with_bad_beams_masked` and deprecated `mask_out_bad_beams`
e-koch Oct 15, 2020
0aca1a6
PR #87 will raise a BeamError for beams that cannot be deconvolved; a…
e-koch Oct 15, 2020
e8a93ac
Try accessing the common beam before any other checks to see if it ex…
e-koch Oct 15, 2020
f64f75c
compute_common_beam shouldn't be private
e-koch Oct 15, 2020
cf14a69
Change common beam masking changes to test output, not the attribute
e-koch Oct 22, 2020
6f48baf
Update compute_common_beam docs; with_common_beam moving to own PR
e-koch Oct 22, 2020
5206ff4
Fix inline string in docs
e-koch Nov 11, 2020
6e86c8a
casa io tests didn't get removed in the rebase...
e-koch Nov 11, 2020
612326f
Add da.Array as accepted type for masks in low dim objects
e-koch Nov 19, 2020
2044657
Remove wrong warning about triggering a whole cube convolution; that …
e-koch Nov 19, 2020
147d9be
Remove the unneeded beam test against the old averaged beam
e-koch Nov 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Small fixes from @astrofrog
e-koch committed Nov 11, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2156ea9cd8c7517cac8d19174ace96408357ee89
2 changes: 1 addition & 1 deletion docs/beam_handling.rst
Original file line number Diff line number Diff line change
@@ -131,7 +131,7 @@ Note that this is equivalent to setting the beam threshold to 0.
Identifying channels with bad beams
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Some cubes may have channels with beams that vary drastically over small ranges overlap
Some cubes may have channels with beams that vary drastically over small ranges in spectral
channels. This is often the case where a range of channels has poor data or is affected
by radio frequency interference, leading to most of the data in that channel being flagged.
If these channels are kept, the smallest common beam (see :doc:`smoothing`) may be much
4 changes: 2 additions & 2 deletions spectral_cube/base_class.py
Original file line number Diff line number Diff line change
@@ -515,7 +515,7 @@ def identify_bad_beams(self, threshold=None, reference_beam=None,
Parameters
----------
threshold : float, optional
The fractional difference between beam major, minor, and pa to
The fractional difference between beam major, minor, and position angle to
permit. The default is to `~SpectralCube.beam_threshold`, which is initially set
to 0.01 (i.e., <1% changes in the beam area are allowed).
reference_beam : Beam
@@ -782,7 +782,7 @@ def _check_beam_areas(self, threshold, common_beam, mask=None,
warnings.warn(errormessage)
warnings.warn(strictmessage)
warnings.warn("Convolution to a common beam will be triggered at an intermediate level."
" To avoid this step, first convolve the spectral-cube to a common beam size.")
" To avoid this step, first convolve the SpectralCube to a common beam size.")

else:
warnings.warn("Small beam differences are being ignored in this operation. "