|
194 | 194 | "source": [ |
195 | 195 | "from prose import Fluxes\n", |
196 | 196 | "\n", |
197 | | - "fluxes: Fluxes = photometry[-1].fluxes\n" |
| 197 | + "fluxes: Fluxes = photometry[-1].fluxes" |
198 | 198 | ] |
199 | 199 | }, |
200 | 200 | { |
|
255 | 255 | "fluxes.target = 6\n", |
256 | 256 | "\n", |
257 | 257 | "# a bit of cleaning\n", |
258 | | - "nan_stars = np.any(np.isnan(fluxes.fluxes), axis=(0, 2)) # stars with nan fluxes\n", |
259 | | - "fluxes = fluxes.mask_stars(~nan_stars) # mask nans stars\n", |
260 | | - "fluxes = fluxes.sigma_clipping_data(bkg=3, fwhm=3) # sigma clipping\n", |
| 258 | + "nan_stars = np.any(np.isnan(fluxes.fluxes), axis=(0, 2)) # stars with nan fluxes\n", |
| 259 | + "fluxes = fluxes.mask_stars(~nan_stars) # mask nans stars\n", |
| 260 | + "fluxes = fluxes.sigma_clipping_data(bkg=3, fwhm=3) # sigma clipping\n", |
261 | 261 | "\n", |
262 | 262 | "# differential photometry\n", |
263 | 263 | "diff = fluxes.autodiff()\n", |
264 | 264 | "\n", |
265 | 265 | "# plotting\n", |
266 | 266 | "ax = plt.subplot(xlabel=\"time (JD)\", ylabel=\"diff. flux\", ylim=(0.94, 1.06))\n", |
267 | 267 | "diff.plot()\n", |
268 | | - "diff.bin(5 / 60 / 24, estimate_error=True).errorbar()\n" |
| 268 | + "diff.bin(5 / 60 / 24, estimate_error=True).errorbar()" |
269 | 269 | ] |
270 | 270 | }, |
271 | 271 | { |
|
542 | 542 | " y = diff.df[name].copy()\n", |
543 | 543 | " y = (y - np.mean(y)) / np.std(y) + 8 * i\n", |
544 | 544 | " plt.text(diff.time.max(), np.mean(y) + 4, name, ha=\"right\")\n", |
545 | | - " plt.plot(diff.time, y, \".\", c=\"0.8\" if name != \"flux\" else \"k\")\n" |
| 545 | + " plt.plot(diff.time, y, \".\", c=\"0.8\" if name != \"flux\" else \"k\")" |
546 | 546 | ] |
547 | 547 | }, |
548 | 548 | { |
|
604 | 604 | " ],\n", |
605 | 605 | ")\n", |
606 | 606 | "\n", |
607 | | - "faster_photometry.run(sciences)\n" |
| 607 | + "faster_photometry.run(sciences)" |
608 | 608 | ] |
609 | 609 | }, |
610 | 610 | { |
|
616 | 616 | ] |
617 | 617 | }, |
618 | 618 | { |
619 | | - "attachments": {}, |
620 | 619 | "cell_type": "markdown", |
621 | 620 | "metadata": {}, |
622 | | - "source": [] |
| 621 | + "source": [ |
| 622 | + "\n", |
| 623 | + "```{note}\n", |
| 624 | + "[SequenceParallel](prose.core.sequence.SequenceParallel) class is a subclass of [Sequence](prose.core.sequence.Sequence). For example, the `fluxes` after this sequence is ran can be accessed with\n", |
| 625 | + "\n", |
| 626 | + "```python\n", |
| 627 | + "fluxes = faster_photometry.data[-1].fluxes\n", |
| 628 | + "```\n", |
| 629 | + "```" |
| 630 | + ] |
623 | 631 | } |
624 | 632 | ], |
625 | 633 | "metadata": { |
|
0 commit comments