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

adding HWP support to OpSimConviqt. #343

Merged
merged 5 commits into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
49 changes: 49 additions & 0 deletions src/toast/pipeline_tools/sky_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,55 @@ def apply_conviqt(args, comm, data, cache_prefix="signal", verbose=True):
return cache_prefix


@function_timer
def apply_weighted_conviqt(args, comm, data, cache_prefix="signal", verbose=True):
if (
args.conviqt_sky_file is None
or args.conviqt_beam_file is None
or not args.simulate_sky
):
return None

log = Logger.get()
timer = Timer()
timer.start()

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

verbosity = 0
if verbose:
verbosity = 1
if args.debug:
verbosity = 10

conviqt = OpSimWeightedConviqt(
getattr(comm, "comm_" + args.conviqt_mpi_comm),
args.conviqt_sky_file,
args.conviqt_beam_file,
lmax=args.conviqt_lmax,
beammmax=args.conviqt_beam_mmax,
pol=True,
fwhm=args.conviqt_fwhm,
order=args.conviqt_order,
calibrate=True,
dxx=args.conviqt_dxx,
out=cache_prefix,
remove_monopole=args.conviqt_remove_monopole,
remove_dipole=args.conviqt_remove_dipole,
normalize_beam=args.conviqt_normalize_beam,
verbosity=verbosity,
)
conviqt.exec(data)

if comm.comm_world is not None:
comm.comm_world.barrier()
if comm.world_rank == 0 and verbose:
timer.report_clear("Read and sample map")

return cache_prefix


@function_timer
def scan_sky_signal(
args, comm, data, cache_prefix="signal", verbose=True, pixels="pixels", mc=0
Expand Down
Loading