Skip to content

Commit

Permalink
Merge pull request #394 from lsst/bugfix/OPSIM-1132
Browse files Browse the repository at this point in the history
Proper name of download testing data script
  • Loading branch information
rhiannonlynne committed Mar 6, 2024
2 parents bb10845 + daa5b68 commit 88eb4e9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dev = [

[project.scripts]
rs_download_data = "rubin_sim.data.rs_download_data:rs_download_data"
download_testing_data = "rubin_sim.data.rs_download_data:rs_download_testing"
rs_download_testing = "rubin_sim.data.rs_download_data:rs_download_testing"
add_run = "rubin_sim.maf.db.add_run:add_run"
ddf_dir = "rubin_sim.maf.ddf_dir:ddf_dir"
gather_summaries = "rubin_sim.maf.run_comparison.gather_summaries:gather_summaries"
Expand Down
4 changes: 1 addition & 3 deletions rubin_sim/maf/batches/info_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ def info_bundle_dicts(allsky_slicer, wfd_slicer, opsim="opsim", colmap=batches.c
bdict.update(fO)
astrometry = batches.astrometryBatch(colmap=colmap, run_name=opsim, slicer=slicer, extra_info=tag)
bdict.update(astrometry)
rapidrevisit = batches.rapidRevisitBatch(
colmap=colmap, run_name=opsim, slicer=slicer, extra_info=tag
)
rapidrevisit = batches.rapidRevisitBatch(colmap=colmap, run_name=opsim, slicer=slicer, extra_info=tag)
bdict.update(rapidrevisit)

# Intranight (pairs/time)
Expand Down
4 changes: 2 additions & 2 deletions rubin_sim/maf/metrics/simple_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ def __init__(self, min_exp=20.0, expected_exp=30.0, exp_col="visitExposureTime",
self.min_exp = min_exp
self.expected_exp = expected_exp
self.exp_col = exp_col
if 'col' in kwargs:
del kwargs['col']
if "col" in kwargs:
del kwargs["col"]
super().__init__(col=[exp_col], **kwargs)
self.metric_dtype = "int"

Expand Down
8 changes: 3 additions & 5 deletions rubin_sim/maf/plots/special_plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,11 @@ def __call__(self, metric_value, slicer, user_plot_dict, fignum=None):
asky = plot_dict["asky"]
n_visits = plot_dict["n_visits"]
rarr = np.array(list(zip(metric_value.compressed())), dtype=[("fO", metric_value.dtype)])
f_o_area = metrics.FOArea(
col="fO", n_visit=n_visits, norm=False, nside=slicer.nside
).run(rarr)
f_o_area = metrics.FOArea(col="fO", n_visit=n_visits, norm=False, nside=slicer.nside).run(rarr)
f_o_nv = metrics.FONv(col="fO", asky=asky, norm=False, nside=slicer.nside).run(rarr)

plt.axvline(x=n_visits, linewidth=plot_dict["reflinewidth"], color="b", linestyle=':')
plt.axhline(y=asky / 1000.0, linewidth=plot_dict["reflinewidth"], color="r", linestyle=':')
plt.axvline(x=n_visits, linewidth=plot_dict["reflinewidth"], color="b", linestyle=":")
plt.axhline(y=asky / 1000.0, linewidth=plot_dict["reflinewidth"], color="r", linestyle=":")
# Add lines for nvis_median and f_o_area:
# note if these are -666 (badval), they will 'disappear'
nvis_median = f_o_nv["value"][np.where(f_o_nv["name"] == "MedianNvis")][0]
Expand Down

0 comments on commit 88eb4e9

Please sign in to comment.