Skip to content

Commit

Permalink
Work on conviqt polarization:
Browse files Browse the repository at this point in the history
 - Avoiding loops over all  observations in the convolution method

 - OpSimWeightedConviqt now inherits from OpSimConviqt

 - Solved inconsistency in get_psipol

 - More consistent reference frame definitions, more code reuse

 - Making apply_weighted_conviqt and OpSimWeightedConvict importable

 - Do not attempt to remove HWP angle from detector orientation

 - Adding conviqt-calibrate parser argument
  • Loading branch information
Giuseppe Puglisi authored and tskisner committed Jun 11, 2020
1 parent 5bc615e commit f5f14eb
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 281 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Theodore Kisner <work@theodorekisner.com>
Reijo Keskitalo <reijo.keskitalo@gmail.com>
Andrea Zonca <zonca@sdsc.edu>
Giuseppe Puglisi <giuse.puglisi@gmail.com>
1 change: 1 addition & 0 deletions src/toast/pipeline_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
simulate_sky_signal,
add_conviqt_args,
apply_conviqt,
apply_weighted_conviqt,
)
from .sss import add_sss_args, simulate_sss
from .todground import (
Expand Down
24 changes: 20 additions & 4 deletions src/toast/pipeline_tools/sky_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ..utils import Logger, Environment

from ..map import DistPixels
from ..todmap import OpSimPySM, OpSimScan, OpMadam, OpSimConviqt
from ..todmap import OpSimPySM, OpSimScan, OpMadam, OpSimConviqt, OpSimWeightedConviqt


def add_sky_signal_args(parser):
Expand Down Expand Up @@ -205,6 +205,22 @@ def add_conviqt_args(parser):
dest="conviqt_normalize_beam",
)
parser.set_defaults(conviqt_normalize_beam=False)

parser.add_argument(
"--conviqt-calibrate",
required=False,
action="store_true",
help="Normalize the beams",
dest="conviqt_calibrate",
)
parser.add_argument(
"--no-conviqt-calibrate",
required=False,
action="store_false",
help="Do not normalize the beams",
dest="conviqt_calibrate",
)
parser.set_defaults(conviqt_calibrate=True)
parser.add_argument(
"--conviqt-remove-monopole",
required=False,
Expand Down Expand Up @@ -278,7 +294,7 @@ def apply_conviqt(args, comm, data, cache_prefix="signal", verbose=True):
pol=True,
fwhm=args.conviqt_fwhm,
order=args.conviqt_order,
calibrate=True,
calibrate=args.conviqt_calibrate,
dxx=args.conviqt_dxx,
out=cache_prefix,
remove_monopole=args.conviqt_remove_monopole,
Expand Down Expand Up @@ -310,7 +326,7 @@ def apply_weighted_conviqt(args, comm, data, cache_prefix="signal", verbose=True
timer.start()

if comm.world_rank == 0 and verbose:
log.info("Running Conviqt")
log.info("Running Weighted Conviqt")

verbosity = 0
if verbose:
Expand All @@ -327,7 +343,7 @@ def apply_weighted_conviqt(args, comm, data, cache_prefix="signal", verbose=True
pol=True,
fwhm=args.conviqt_fwhm,
order=args.conviqt_order,
calibrate=True,
calibrate=args.conviqt_calibrate,
dxx=args.conviqt_dxx,
out=cache_prefix,
remove_monopole=args.conviqt_remove_monopole,
Expand Down
2 changes: 1 addition & 1 deletion src/toast/todmap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

from .pointing_math import aberrate

from .conviqt import OpSimConviqt
from .conviqt import OpSimConviqt, OpSimWeightedConviqt

from .atm import available_utils as atm_available_utils
from .mapsampler import MapSampler
Expand Down
Loading

0 comments on commit f5f14eb

Please sign in to comment.