Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Make ensemble's object and source fields public #236

Closed
wants to merge 2 commits into from
Closed
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
14 changes: 7 additions & 7 deletions docs/tutorials/binning_slowly_changing_sources.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"outputs": [],
"source": [
"fig, ax = plt.subplots(1, 1)\n",
"_ = ax.hist(ens._source[\"midPointTai\"].compute().tolist(), 500)\n",
"_ = ax.hist(ens.source[\"midPointTai\"].compute().tolist(), 500)\n",
"_ = ax.set_xlabel(\"Time (MJD)\")\n",
"_ = ax.set_ylabel(\"Source Count\")"
]
Expand Down Expand Up @@ -90,7 +90,7 @@
"source": [
"ens.bin_sources(time_window=7.0, offset=0.0)\n",
"fig, ax = plt.subplots(1, 1)\n",
"_ = ax.hist(ens._source[\"midPointTai\"].compute().tolist(), 500)\n",
"_ = ax.hist(ens.source[\"midPointTai\"].compute().tolist(), 500)\n",
"_ = ax.set_xlabel(\"Time (MJD)\")\n",
"_ = ax.set_ylabel(\"Source Count\")"
]
Expand Down Expand Up @@ -120,7 +120,7 @@
"source": [
"ens.bin_sources(time_window=28.0, offset=0.0, custom_aggr={\"midPointTai\": \"min\"})\n",
"fig, ax = plt.subplots(1, 1)\n",
"_ = ax.hist(ens._source[\"midPointTai\"].compute().tolist(), 500)\n",
"_ = ax.hist(ens.source[\"midPointTai\"].compute().tolist(), 500)\n",
"_ = ax.set_xlabel(\"Time (MJD)\")\n",
"_ = ax.set_ylabel(\"Source Count\")"
]
Expand Down Expand Up @@ -150,7 +150,7 @@
"ens.from_source_dict(rows, column_mapper=cmap)\n",
"\n",
"fig, ax = plt.subplots(1, 1)\n",
"_ = ax.hist(ens._source[\"midPointTai\"].compute().tolist(), 60)\n",
"_ = ax.hist(ens.source[\"midPointTai\"].compute().tolist(), 60)\n",
"_ = ax.set_xlabel(\"Time (MJD)\")\n",
"_ = ax.set_ylabel(\"Source Count\")"
]
Expand Down Expand Up @@ -179,7 +179,7 @@
"ens.bin_sources(time_window=1.0, offset=0.0)\n",
"\n",
"fig, ax = plt.subplots(1, 1)\n",
"_ = ax.hist(ens._source[\"midPointTai\"].compute().tolist(), 60)\n",
"_ = ax.hist(ens.source[\"midPointTai\"].compute().tolist(), 60)\n",
"_ = ax.set_xlabel(\"Time (MJD)\")\n",
"_ = ax.set_ylabel(\"Source Count\")"
]
Expand Down Expand Up @@ -209,7 +209,7 @@
"ens.bin_sources(time_window=1.0, offset=0.5)\n",
"\n",
"fig, ax = plt.subplots(1, 1)\n",
"_ = ax.hist(ens._source[\"midPointTai\"].compute().tolist(), 60)\n",
"_ = ax.hist(ens.source[\"midPointTai\"].compute().tolist(), 60)\n",
"_ = ax.set_xlabel(\"Time (MJD)\")\n",
"_ = ax.set_ylabel(\"Source Count\")"
]
Expand Down Expand Up @@ -259,7 +259,7 @@
"ens.bin_sources(time_window=1.0, offset=0.5)\n",
"\n",
"fig, ax = plt.subplots(1, 1)\n",
"_ = ax.hist(ens._source[\"midPointTai\"].compute().tolist(), 60)\n",
"_ = ax.hist(ens.source[\"midPointTai\"].compute().tolist(), 60)\n",
"_ = ax.set_xlabel(\"Time (MJD)\")\n",
"_ = ax.set_ylabel(\"Source Count\")"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/scaling_to_large_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
"\n",
"print(\"number of lightcurve results in mapres: \", len(mapres))\n",
"print(\"number of lightcurve results in groupres: \", len(groupres))\n",
"print(\"True number of lightcurves in the dataset:\", len(np.unique(ens._source.index)))"
"print(\"True number of lightcurves in the dataset:\", len(np.unique(ens.source.index)))"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/using_ray_with_the_ensemble.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"outputs": [],
"source": [
"ens.from_dataset(\"s82_qso\")\n",
"ens._source = ens._source.repartition(npartitions=10)\n",
"ens.source = ens.source.repartition(npartitions=10)\n",
"ens.batch(calc_sf2, use_map=False) # use_map is false as we repartition naively, splitting per-object sources across partitions"
]
},
Expand Down Expand Up @@ -116,7 +116,7 @@
"\n",
"ens=Ensemble(client=False) # Do not use a client\n",
"ens.from_dataset(\"s82_qso\")\n",
"ens._source = ens._source.repartition(npartitions=10)\n",
"ens.source = ens.source.repartition(npartitions=10)\n",
"ens.batch(calc_sf2, use_map=False)"
]
},
Expand Down Expand Up @@ -150,7 +150,7 @@
"\n",
"ens = Ensemble()\n",
"ens.from_dataset(\"s82_qso\")\n",
"ens._source = ens._source.repartition(npartitions=10)\n",
"ens.source = ens.source.repartition(npartitions=10)\n",
"ens.batch(calc_sf2, use_map=False)"
]
}
Expand Down
Loading