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

Add a section to example notebook for testing the scheduler. #1191

Merged
merged 2 commits into from
Aug 16, 2023
Merged
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
40 changes: 38 additions & 2 deletions notebooks/TestPOCS.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,49 @@
" cam.take_exposure(seconds=2, filename=f'/home/panoptes/images/{cam_name}-test-{now}.cr2', blocking=True)"
]
},
{
"cell_type": "markdown",
"id": "13816d0a",
"metadata": {},
"source": [
"# Scheduler testing commands\n",
"\n",
"To schedule an observation the `pocs.observatory` will look at all the potential targets in the fields file and try to determine the \"best\" observation. "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b9160eb9",
"id": "8eacb871",
"metadata": {},
"outputs": [],
"source": []
"source": [
"pocs.observatory.get_observation()"
]
},
{
"cell_type": "markdown",
"id": "d552c57f",
"metadata": {},
"source": [
"It's possible that there will not be any valid observations available.\n",
"\n",
"If a valid observation is found, it will be assigned to `pocs.observatory.current_observation` and also tells the mount about the target. You can then do things like:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "508d4980",
"metadata": {},
"outputs": [],
"source": [
"# Make sure the mount is unparked\n",
"pocs.observatory.mount.unpark()\n",
"\n",
"# Move to the target.\n",
"pocs.observatory.mount.slew_to_target()"
]
}
],
"metadata": {
Expand Down
Loading