{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astroplan/pulls/comments/74489528","id":74489528,"diff_hunk":"@@ -0,0 +1,258 @@\n+.. _scheduling_tutorial:\n+\n+.. doctest-skip-all\n+\n+***************************\n+Scheduling an Observing Run\n+***************************\n+\n+.. note::\n+\n+    Some terms used have been defined in :ref:`Terminology <terminology>`.\n+\n+Contents\n+========\n+\n+* :ref:`scheduling-defining_targets`\n+\n+* :ref:`scheduling-creating_constraints_and_observing_blocks`\n+\n+* :ref:`scheduling-creating_a_transitioner`\n+\n+* :ref:`scheduling-scheduling`\n+\n+.. _scheduling-defining_targets:\n+\n+Defining Targets\n+================\n+\n+We want to observe Deneb and M13 in the B, V and R filters. We are scheduled\n+for the first half-night on July 6 2016 and want to know the order we should\n+schedule the targets in.\n+\n+First we define our `~astroplan.Observer` object (where we are observing from):\n+\n+.. code-block:: python\n+\n+    >>> from astroplan import Observer\n+\n+    >>> apo = Observer.at_site('apo')\n+\n+Now we want to define our list of targets (`~astroplan.FixedTarget` objects),\n+any object that is in SIMBAD can be called by an identifier.\n+\n+.. code-block:: python\n+\n+    >>> from astroplan import FixedTarget\n+\n+    >>> Deneb = FixedTarget.from_name('deneb')\n+    >>> M13 = FixedTarget.from_name('m13')\n+\n+    >>> Deneb\n+    <FixedTarget \"deneb\" at SkyCoord (ICRS): (ra, dec) in deg (310.35797975, 45.28033881)>\n+\n+    >>> M13\n+    <FixedTarget \"m13\" at SkyCoord (ICRS): (ra, dec) in deg (250.423475, 36.4613194)>\n+\n+We also need to define when we will be observing the targets, `~astropy.time.Time`\n+objects for the start and end of our observing window. The half night goes from 7PM\n+local time to 1AM local time, in UTC this will be from 2AM to 8AM.\n+\n+.. code-block:: python\n+\n+    >>> from astropy.time import Time\n+\n+    >>> start_time = Time('2016-06-07 02:00')\n+    >>> end_time = Time('2016-06-07 08:00')\n+\n+:ref:`Return to Top <scheduling_tutorial>`\n+\n+.. _scheduling-creating_constraints_and_observing_blocks:\n+\n+Creating Constraints and Observing Blocks\n+=========================================\n+\n+An in-depth tutorial on creating and using constraints can be found in\n+the :ref:`constraint tutorial <constraints>`.\n+\n+Constraints, when evaluated, take targets and times, and give scores that\n+indicate how well the combination of target and time fulfill the constraint.\n+We want to make sure that our targets will be high in the sky while observed\n+and that they will be observed during the night. We don't want any object to\n+be observed at an airmass greater than 3, but we prefer a better airmass.\n+Usually constraints scores are boolean, but with ``boolean_constraint = False``\n+the constraint will output floats instead, indicated when it is closer to ideal.\n+\n+.. code-block:: python\n+\n+    >>> from astroplan.constraints import AtNightConstraint, AirmassConstraint\n+\n+    >>> global_constraints = [AirmassConstraint(max = 3, boolean_constraint = False),\n+    ...                       AtNightConstraint()]\n+\n+Now that we have constraints that we will apply to every target, we need to\n+create an   `~astroplan.ObservingBlock` for each target+configuration\n+combination. An observing block needs a target, a duration, and a priority;\n+configuration information can also be given (i.e. filter, instrument, etc.).\n+For each filter we want 17 exposures per target (100 seconds for M13 and 60\n+seconds for Deneb) and the instrument has a read-out time of 20 seconds.\n+We also need to consider that the moon can be a problem for observations\n+in the B filter, so we want the moon to be down or dim for the B filter.\n+\n+.. code-block:: python\n+\n+    >>> from astroplan import ObservingBlock\n+    >>> from astroplan.constraints import MoonIlluminationConstraint\n+    >>> from astropy import units as u\n+\n+    >>> rot = 20 * u.second\n+    >>> blocks = []\n+\n+    >>> for filter in ['B', 'G', 'R']:\n+    >>>     if filter == 'B':","path":"docs/tutorials/scheduling.rst","position":112,"original_position":112,"commit_id":"4afe41fe516480e9d699fd28ad8411f67ec06b81","original_commit_id":"4afe41fe516480e9d699fd28ad8411f67ec06b81","user":{"login":"bmorris3","id":3497584,"avatar_url":"https://avatars.githubusercontent.com/u/3497584?v=3","gravatar_id":"","url":"https://api.github.com/users/bmorris3","html_url":"https://github.com/bmorris3","followers_url":"https://api.github.com/users/bmorris3/followers","following_url":"https://api.github.com/users/bmorris3/following{/other_user}","gists_url":"https://api.github.com/users/bmorris3/gists{/gist_id}","starred_url":"https://api.github.com/users/bmorris3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmorris3/subscriptions","organizations_url":"https://api.github.com/users/bmorris3/orgs","repos_url":"https://api.github.com/users/bmorris3/repos","events_url":"https://api.github.com/users/bmorris3/events{/privacy}","received_events_url":"https://api.github.com/users/bmorris3/received_events","type":"User","site_admin":false},"body":"If you're indenting, use `...` rather than `>>>` (if you're using those symbols at all, see above comment).","created_at":"2016-08-11T19:42:51Z","updated_at":"2016-08-11T19:42:51Z","html_url":"https://github.com/astropy/astroplan/pull/218#discussion_r74489528","pull_request_url":"https://api.github.com/repos/astropy/astroplan/pulls/218","_links":{"self":{"href":"https://api.github.com/repos/astropy/astroplan/pulls/comments/74489528"},"html":{"href":"https://github.com/astropy/astroplan/pull/218#discussion_r74489528"},"pull_request":{"href":"https://api.github.com/repos/astropy/astroplan/pulls/218"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astroplan/pulls/218","id":80170206,"html_url":"https://github.com/astropy/astroplan/pull/218","diff_url":"https://github.com/astropy/astroplan/pull/218.diff","patch_url":"https://github.com/astropy/astroplan/pull/218.patch","issue_url":"https://api.github.com/repos/astropy/astroplan/issues/218","number":218,"state":"open","locked":false,"title":"Tutorial for Scheduling","user":{"login":"kvyh","id":16695529,"avatar_url":"https://avatars.githubusercontent.com/u/16695529?v=3","gravatar_id":"","url":"https://api.github.com/users/kvyh","html_url":"https://github.com/kvyh","followers_url":"https://api.github.com/users/kvyh/followers","following_url":"https://api.github.com/users/kvyh/following{/other_user}","gists_url":"https://api.github.com/users/kvyh/gists{/gist_id}","starred_url":"https://api.github.com/users/kvyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvyh/subscriptions","organizations_url":"https://api.github.com/users/kvyh/orgs","repos_url":"https://api.github.com/users/kvyh/repos","events_url":"https://api.github.com/users/kvyh/events{/privacy}","received_events_url":"https://api.github.com/users/kvyh/received_events","type":"User","site_admin":false},"body":"This contains the Scheduling Tutorial in the docs, but was rebased off of code that it requires to function. This will replace #208 and is intended to solve #200 .\r\n\r\nThere is a work left to do on the tutorial itself so that it better reflects how it would be used, so I will be rewriting specific parts of it over the coming days.","created_at":"2016-08-05T00:10:19Z","updated_at":"2016-08-11T19:42:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06fa2cbc0a73aec8e1ea7c50b37946c0d9a823bb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/astropy/astroplan/pulls/218/commits","review_comments_url":"https://api.github.com/repos/astropy/astroplan/pulls/218/comments","review_comment_url":"https://api.github.com/repos/astropy/astroplan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/astroplan/issues/218/comments","statuses_url":"https://api.github.com/repos/astropy/astroplan/statuses/4afe41fe516480e9d699fd28ad8411f67ec06b81","head":{"label":"kvyh:tutorial_for_scheduling","ref":"tutorial_for_scheduling","sha":"4afe41fe516480e9d699fd28ad8411f67ec06b81","user":{"login":"kvyh","id":16695529,"avatar_url":"https://avatars.githubusercontent.com/u/16695529?v=3","gravatar_id":"","url":"https://api.github.com/users/kvyh","html_url":"https://github.com/kvyh","followers_url":"https://api.github.com/users/kvyh/followers","following_url":"https://api.github.com/users/kvyh/following{/other_user}","gists_url":"https://api.github.com/users/kvyh/gists{/gist_id}","starred_url":"https://api.github.com/users/kvyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvyh/subscriptions","organizations_url":"https://api.github.com/users/kvyh/orgs","repos_url":"https://api.github.com/users/kvyh/repos","events_url":"https://api.github.com/users/kvyh/events{/privacy}","received_events_url":"https://api.github.com/users/kvyh/received_events","type":"User","site_admin":false},"repo":{"id":54685099,"name":"astroplan","full_name":"kvyh/astroplan","owner":{"login":"kvyh","id":16695529,"avatar_url":"https://avatars.githubusercontent.com/u/16695529?v=3","gravatar_id":"","url":"https://api.github.com/users/kvyh","html_url":"https://github.com/kvyh","followers_url":"https://api.github.com/users/kvyh/followers","following_url":"https://api.github.com/users/kvyh/following{/other_user}","gists_url":"https://api.github.com/users/kvyh/gists{/gist_id}","starred_url":"https://api.github.com/users/kvyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvyh/subscriptions","organizations_url":"https://api.github.com/users/kvyh/orgs","repos_url":"https://api.github.com/users/kvyh/repos","events_url":"https://api.github.com/users/kvyh/events{/privacy}","received_events_url":"https://api.github.com/users/kvyh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kvyh/astroplan","description":"Observation planning package for astronomers","fork":true,"url":"https://api.github.com/repos/kvyh/astroplan","forks_url":"https://api.github.com/repos/kvyh/astroplan/forks","keys_url":"https://api.github.com/repos/kvyh/astroplan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kvyh/astroplan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kvyh/astroplan/teams","hooks_url":"https://api.github.com/repos/kvyh/astroplan/hooks","issue_events_url":"https://api.github.com/repos/kvyh/astroplan/issues/events{/number}","events_url":"https://api.github.com/repos/kvyh/astroplan/events","assignees_url":"https://api.github.com/repos/kvyh/astroplan/assignees{/user}","branches_url":"https://api.github.com/repos/kvyh/astroplan/branches{/branch}","tags_url":"https://api.github.com/repos/kvyh/astroplan/tags","blobs_url":"https://api.github.com/repos/kvyh/astroplan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kvyh/astroplan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kvyh/astroplan/git/refs{/sha}","trees_url":"https://api.github.com/repos/kvyh/astroplan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kvyh/astroplan/statuses/{sha}","languages_url":"https://api.github.com/repos/kvyh/astroplan/languages","stargazers_url":"https://api.github.com/repos/kvyh/astroplan/stargazers","contributors_url":"https://api.github.com/repos/kvyh/astroplan/contributors","subscribers_url":"https://api.github.com/repos/kvyh/astroplan/subscribers","subscription_url":"https://api.github.com/repos/kvyh/astroplan/subscription","commits_url":"https://api.github.com/repos/kvyh/astroplan/commits{/sha}","git_commits_url":"https://api.github.com/repos/kvyh/astroplan/git/commits{/sha}","comments_url":"https://api.github.com/repos/kvyh/astroplan/comments{/number}","issue_comment_url":"https://api.github.com/repos/kvyh/astroplan/issues/comments{/number}","contents_url":"https://api.github.com/repos/kvyh/astroplan/contents/{+path}","compare_url":"https://api.github.com/repos/kvyh/astroplan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kvyh/astroplan/merges","archive_url":"https://api.github.com/repos/kvyh/astroplan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kvyh/astroplan/downloads","issues_url":"https://api.github.com/repos/kvyh/astroplan/issues{/number}","pulls_url":"https://api.github.com/repos/kvyh/astroplan/pulls{/number}","milestones_url":"https://api.github.com/repos/kvyh/astroplan/milestones{/number}","notifications_url":"https://api.github.com/repos/kvyh/astroplan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kvyh/astroplan/labels{/name}","releases_url":"https://api.github.com/repos/kvyh/astroplan/releases{/id}","deployments_url":"https://api.github.com/repos/kvyh/astroplan/deployments","created_at":"2016-03-25T01:19:47Z","updated_at":"2016-03-25T01:19:48Z","pushed_at":"2016-08-11T00:16:20Z","git_url":"git://github.com/kvyh/astroplan.git","ssh_url":"git@github.com:kvyh/astroplan.git","clone_url":"https://github.com/kvyh/astroplan.git","svn_url":"https://github.com/kvyh/astroplan","homepage":"https://astroplan.readthedocs.org/","size":3448,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"595b137eceabd7515a8bcbb6c93251eec8409fe4","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":34693515,"name":"astroplan","full_name":"astropy/astroplan","owner":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/astroplan","description":"Observation planning package for astronomers","fork":false,"url":"https://api.github.com/repos/astropy/astroplan","forks_url":"https://api.github.com/repos/astropy/astroplan/forks","keys_url":"https://api.github.com/repos/astropy/astroplan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astroplan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astroplan/teams","hooks_url":"https://api.github.com/repos/astropy/astroplan/hooks","issue_events_url":"https://api.github.com/repos/astropy/astroplan/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astroplan/events","assignees_url":"https://api.github.com/repos/astropy/astroplan/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astroplan/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astroplan/tags","blobs_url":"https://api.github.com/repos/astropy/astroplan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astroplan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astroplan/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astroplan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astroplan/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astroplan/languages","stargazers_url":"https://api.github.com/repos/astropy/astroplan/stargazers","contributors_url":"https://api.github.com/repos/astropy/astroplan/contributors","subscribers_url":"https://api.github.com/repos/astropy/astroplan/subscribers","subscription_url":"https://api.github.com/repos/astropy/astroplan/subscription","commits_url":"https://api.github.com/repos/astropy/astroplan/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astroplan/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astroplan/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astroplan/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/astroplan/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astroplan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astroplan/merges","archive_url":"https://api.github.com/repos/astropy/astroplan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astroplan/downloads","issues_url":"https://api.github.com/repos/astropy/astroplan/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astroplan/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astroplan/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astroplan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astroplan/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astroplan/releases{/id}","deployments_url":"https://api.github.com/repos/astropy/astroplan/deployments","created_at":"2015-04-27T22:00:00Z","updated_at":"2016-07-26T16:30:38Z","pushed_at":"2016-08-11T19:03:38Z","git_url":"git://github.com/astropy/astroplan.git","ssh_url":"git@github.com:astropy/astroplan.git","clone_url":"https://github.com/astropy/astroplan.git","svn_url":"https://github.com/astropy/astroplan","homepage":"https://astroplan.readthedocs.org/","size":4406,"stargazers_count":27,"watchers_count":27,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":49,"forks":25,"open_issues":49,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astroplan/pulls/218"},"html":{"href":"https://github.com/astropy/astroplan/pull/218"},"issue":{"href":"https://api.github.com/repos/astropy/astroplan/issues/218"},"comments":{"href":"https://api.github.com/repos/astropy/astroplan/issues/218/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astroplan/pulls/218/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astroplan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/astroplan/pulls/218/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astroplan/statuses/4afe41fe516480e9d699fd28ad8411f67ec06b81"}}}}
{"actor":{"display_login":"bmorris3"}}