{"action":"created","comment":{"url":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/comments/31468982","id":31468982,"diff_hunk":"@@ -0,0 +1,232 @@\n+%YAML 1.1\n+---\n+$schema: \"http://stsci.edu/schemas/yaml-schema/draft-01\"\n+id: \"http://stsci.edu/schemas/asdf/0.1.0/time/time\"\n+title: Represents an instance in time.\n+description: |\n+  A \"time\" is a single instant in time.  It may explicitly specify the\n+  way time is represented (the \"format\") and the \"scale\" which the\n+  offset and scaling relation of the unit of time.\n+\n+  Specific emphasis is placed on supporting time scales (e.g. UTC,\n+  TAI, UT1, TDB) and time representations (e.g. JD, MJD, ISO 8601)\n+  that are used in astronomy and required to calculate, e.g., sidereal\n+  times and barycentric corrections.\n+\n+  Times may be represented as one of the following:\n+\n+  - an object, with explicit `value`, and optional `format`, `scale`\n+    and `location`.\n+\n+  - a string, in which case the format is guessed from across\n+    the unambiguous options (`iso`, `byear`, `jyear`, `yday`), and the\n+    scale is hardcoded to `UTC`.\n+\n+  In either case, a single time tag may be used to represent an\n+  n-dimensional array of times, using either an `ndarray` tag or\n+  inline as (possibly nested) YAML lists.  If YAML lists, the same\n+  format must be used for all time values [TODO: This is a restriction\n+  of astropy: Do we need to retain it or should we try to fix that?]\n+\n+examples:\n+  -\n+    - Example ISO time\n+    - |\n+        !time/time \"2000-12-31T13:05:27.737\"\n+\n+  -\n+    - Example year, day-of-year and time format time\n+    - |\n+        !time/time \"2001:003:04:05:06.789\"\n+\n+  -\n+    - Example Besselian Epoch time\n+    - |\n+        !time/time\n+          value: 2000.0\n+          format: byear\n+\n+  -\n+    - Example list of times\n+    - |\n+        !time/time\n+          [\"2000-12-31T13:05:27.737\", \"2000-12-31T13:06:38.444\"]\n+\n+  -\n+    - Example array of times\n+    - |\n+        !time/time\n+          value: !core/ndarray\n+            data: [2000.1, 2000.2, 2000.3]\n+            datatype: float64\n+          format: jyear\n+\n+allOf:\n+  - tag: \"tag:stsci.edu:asdf/0.1.0/time/time\"\n+  - anyOf:\n+    - type: string\n+      # TODO: pattern\n+\n+    - type: array\n+      # We can't say `items: string` here, since then we'd couldn't\n+      # have nested lists.\n+\n+    - $ref: ../core/ndarray\n+\n+    - type: object\n+      properties:\n+        value:\n+          description: |\n+            The value(s) of the time.\n+\n+          anyOf:\n+            - type: string\n+            - type: number\n+            - type: array\n+            - $ref: ../core/ndarray\n+\n+        format:\n+          description: |\n+            The format of the time.\n+\n+            If not provided, the the format should be guessed from the\n+            string from among the following unambiguous options:\n+            `iso`, `byear`, `jyear` and `yday`.\n+\n+            The supported formats are:\n+\n+            - `iso`: ISO 8601 compliant date-time format\n+              `YYYY-MM-DDTHH:MM:SS.sss...`.  For example,\n+              `2000-01-01 00:00:00.000` is midnight on January 1,\n+              2000.  The `T` separating the date from the time\n+              section is optional.\n+\n+            - `yday`: Year, day-of-year and time as\n+              `YYYY:DOY:HH:MM:SS.sss...`. The day-of-year (DOY) goes\n+              from 001 to 365 (366 in leap years). For example,\n+              `2000:001:00:00:00.000` is midnight on January 1,\n+              2000.\n+\n+            - `byear`: Besselian Epoch year, eg. `B1950.0`.  The `B`\n+              is optional if the `byear` format is explicitly\n+              specified.\n+\n+            - `jyear`: Julian Epoch year, eg. `J2000.0`.  The `J` is\n+              optional if the `jyear` format is explicitly\n+              specified.\n+\n+            - `decimalyear`: Time as a decimal year, with integer\n+              values corresponding to midnight of the first day of\n+              each year. For example 2000.5 corresponds to the ISO\n+              time `2000-07-02 00:00:00`.\n+\n+            - `jd`: Julian Date time format. This represents the\n+              number of days since the beginning of the Julian\n+              Period. For example, 2451544.5 in `jd` is midnight on\n+              January 1, 2000.\n+\n+            - `mjd`: Modified Julian Date time format. This\n+              represents the number of days since midnight on\n+              November 17, 1858. For example, 51544.0 in MJD is\n+              midnight on January 1, 2000.\n+\n+            - `gps`: GPS time: seconds from 1980-01-06 00:00:00 UTC\n+              For example, 630720013.0 is midnight on January 1,\n+              2000.\n+\n+            - `unix`: Unix time: seconds from 1970-01-01 00:00:00\n+              UTC. For example, 946684800.0 in Unix time is midnight\n+              on January 1, 2000.  [TODO: Astropy's definition of\n+              UNIX time doesn't match POSIX's here.  What should we\n+              do for the purposes of ASDF?]\n+\n+            - `cxcsec`: Chandra X-ray Center seconds from 1998-01-01\n+              00:00:00 TT. For example, 63072064.184 is midnight on\n+              January 1, 2000.  [TODO: Is this general enough to\n+              include?]\n+\n+          enum:\n+            - iso\n+            - yday\n+            - byear\n+            - jyear\n+            - decimalyear\n+            - jd\n+            - mjd\n+            - gps\n+            - unix\n+            - cxcsec\n+\n+        scale:\n+          description: |\n+            The time scale (or time standard) is a specification for\n+            measuring time: either the rate at which time passes; or\n+            points in time; or both. See also [3] and [4].\n+\n+            [TODO: Describing these scales in enough detail to","path":"schemas/stsci.edu/asdf/0.1.0/time/time.yaml","position":166,"original_position":166,"commit_id":"1526b2f5d25722c4addfe01f2311eaf95481878c","original_commit_id":"1526b2f5d25722c4addfe01f2311eaf95481878c","user":{"login":"taldcroft","id":348089,"avatar_url":"https://avatars.githubusercontent.com/u/348089?v=3","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"body":"I think that http://www.iausofa.org/sofa_ts_c.pdf and references therein is sufficient.","created_at":"2015-06-01T20:53:34Z","updated_at":"2015-06-01T20:53:34Z","html_url":"https://github.com/spacetelescope/asdf-standard/pull/87#discussion_r31468982","pull_request_url":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/87","_links":{"self":{"href":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/comments/31468982"},"html":{"href":"https://github.com/spacetelescope/asdf-standard/pull/87#discussion_r31468982"},"pull_request":{"href":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/87","id":36659692,"html_url":"https://github.com/spacetelescope/asdf-standard/pull/87","diff_url":"https://github.com/spacetelescope/asdf-standard/pull/87.diff","patch_url":"https://github.com/spacetelescope/asdf-standard/pull/87.patch","issue_url":"https://api.github.com/repos/spacetelescope/asdf-standard/issues/87","number":87,"state":"open","locked":false,"title":"Add support for a time type","user":{"login":"mdboom","id":38294,"avatar_url":"https://avatars.githubusercontent.com/u/38294?v=3","gravatar_id":"","url":"https://api.github.com/users/mdboom","html_url":"https://github.com/mdboom","followers_url":"https://api.github.com/users/mdboom/followers","following_url":"https://api.github.com/users/mdboom/following{/other_user}","gists_url":"https://api.github.com/users/mdboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mdboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdboom/subscriptions","organizations_url":"https://api.github.com/users/mdboom/orgs","repos_url":"https://api.github.com/users/mdboom/repos","events_url":"https://api.github.com/users/mdboom/events{/privacy}","received_events_url":"https://api.github.com/users/mdboom/received_events","type":"User","site_admin":false},"body":"This provides a way to represent time in ASDF.\r\n\r\n@taldcroft: This is mostly based around what astropy does (with some simplifications to remove things that aren't really relevant to a file format).  I'd really appreciate your thoughts on this one (and there are some TODO questions below).","created_at":"2015-06-01T19:04:02Z","updated_at":"2015-06-01T20:53:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"999ed246c06bf8761bf64257e49626a2119f33a4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/87/commits","review_comments_url":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/87/comments","review_comment_url":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spacetelescope/asdf-standard/issues/87/comments","statuses_url":"https://api.github.com/repos/spacetelescope/asdf-standard/statuses/1526b2f5d25722c4addfe01f2311eaf95481878c","head":{"label":"mdboom:time","ref":"time","sha":"1526b2f5d25722c4addfe01f2311eaf95481878c","user":{"login":"mdboom","id":38294,"avatar_url":"https://avatars.githubusercontent.com/u/38294?v=3","gravatar_id":"","url":"https://api.github.com/users/mdboom","html_url":"https://github.com/mdboom","followers_url":"https://api.github.com/users/mdboom/followers","following_url":"https://api.github.com/users/mdboom/following{/other_user}","gists_url":"https://api.github.com/users/mdboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mdboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdboom/subscriptions","organizations_url":"https://api.github.com/users/mdboom/orgs","repos_url":"https://api.github.com/users/mdboom/repos","events_url":"https://api.github.com/users/mdboom/events{/privacy}","received_events_url":"https://api.github.com/users/mdboom/received_events","type":"User","site_admin":false},"repo":{"id":18113568,"name":"asdf-standard","full_name":"mdboom/asdf-standard","owner":{"login":"mdboom","id":38294,"avatar_url":"https://avatars.githubusercontent.com/u/38294?v=3","gravatar_id":"","url":"https://api.github.com/users/mdboom","html_url":"https://github.com/mdboom","followers_url":"https://api.github.com/users/mdboom/followers","following_url":"https://api.github.com/users/mdboom/following{/other_user}","gists_url":"https://api.github.com/users/mdboom/gists{/gist_id}","starred_url":"https://api.github.com/users/mdboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdboom/subscriptions","organizations_url":"https://api.github.com/users/mdboom/orgs","repos_url":"https://api.github.com/users/mdboom/repos","events_url":"https://api.github.com/users/mdboom/events{/privacy}","received_events_url":"https://api.github.com/users/mdboom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mdboom/asdf-standard","description":"Standards document describing FINF (FINF is not FITS), the next generation astronomical data format","fork":true,"url":"https://api.github.com/repos/mdboom/asdf-standard","forks_url":"https://api.github.com/repos/mdboom/asdf-standard/forks","keys_url":"https://api.github.com/repos/mdboom/asdf-standard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdboom/asdf-standard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdboom/asdf-standard/teams","hooks_url":"https://api.github.com/repos/mdboom/asdf-standard/hooks","issue_events_url":"https://api.github.com/repos/mdboom/asdf-standard/issues/events{/number}","events_url":"https://api.github.com/repos/mdboom/asdf-standard/events","assignees_url":"https://api.github.com/repos/mdboom/asdf-standard/assignees{/user}","branches_url":"https://api.github.com/repos/mdboom/asdf-standard/branches{/branch}","tags_url":"https://api.github.com/repos/mdboom/asdf-standard/tags","blobs_url":"https://api.github.com/repos/mdboom/asdf-standard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdboom/asdf-standard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdboom/asdf-standard/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdboom/asdf-standard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdboom/asdf-standard/statuses/{sha}","languages_url":"https://api.github.com/repos/mdboom/asdf-standard/languages","stargazers_url":"https://api.github.com/repos/mdboom/asdf-standard/stargazers","contributors_url":"https://api.github.com/repos/mdboom/asdf-standard/contributors","subscribers_url":"https://api.github.com/repos/mdboom/asdf-standard/subscribers","subscription_url":"https://api.github.com/repos/mdboom/asdf-standard/subscription","commits_url":"https://api.github.com/repos/mdboom/asdf-standard/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdboom/asdf-standard/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdboom/asdf-standard/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdboom/asdf-standard/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdboom/asdf-standard/contents/{+path}","compare_url":"https://api.github.com/repos/mdboom/asdf-standard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdboom/asdf-standard/merges","archive_url":"https://api.github.com/repos/mdboom/asdf-standard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdboom/asdf-standard/downloads","issues_url":"https://api.github.com/repos/mdboom/asdf-standard/issues{/number}","pulls_url":"https://api.github.com/repos/mdboom/asdf-standard/pulls{/number}","milestones_url":"https://api.github.com/repos/mdboom/asdf-standard/milestones{/number}","notifications_url":"https://api.github.com/repos/mdboom/asdf-standard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdboom/asdf-standard/labels{/name}","releases_url":"https://api.github.com/repos/mdboom/asdf-standard/releases{/id}","created_at":"2014-03-25T19:26:33Z","updated_at":"2015-01-15T15:57:17Z","pushed_at":"2015-06-01T19:01:36Z","git_url":"git://github.com/mdboom/asdf-standard.git","ssh_url":"git@github.com:mdboom/asdf-standard.git","clone_url":"https://github.com/mdboom/asdf-standard.git","svn_url":"https://github.com/mdboom/asdf-standard","homepage":null,"size":883,"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":"spacetelescope:master","ref":"master","sha":"b14cc1f04edd16eb965103d34fc939c7c24e1ba8","user":{"login":"spacetelescope","id":2751928,"avatar_url":"https://avatars.githubusercontent.com/u/2751928?v=3","gravatar_id":"","url":"https://api.github.com/users/spacetelescope","html_url":"https://github.com/spacetelescope","followers_url":"https://api.github.com/users/spacetelescope/followers","following_url":"https://api.github.com/users/spacetelescope/following{/other_user}","gists_url":"https://api.github.com/users/spacetelescope/gists{/gist_id}","starred_url":"https://api.github.com/users/spacetelescope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacetelescope/subscriptions","organizations_url":"https://api.github.com/users/spacetelescope/orgs","repos_url":"https://api.github.com/users/spacetelescope/repos","events_url":"https://api.github.com/users/spacetelescope/events{/privacy}","received_events_url":"https://api.github.com/users/spacetelescope/received_events","type":"Organization","site_admin":false},"repo":{"id":18113139,"name":"asdf-standard","full_name":"spacetelescope/asdf-standard","owner":{"login":"spacetelescope","id":2751928,"avatar_url":"https://avatars.githubusercontent.com/u/2751928?v=3","gravatar_id":"","url":"https://api.github.com/users/spacetelescope","html_url":"https://github.com/spacetelescope","followers_url":"https://api.github.com/users/spacetelescope/followers","following_url":"https://api.github.com/users/spacetelescope/following{/other_user}","gists_url":"https://api.github.com/users/spacetelescope/gists{/gist_id}","starred_url":"https://api.github.com/users/spacetelescope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacetelescope/subscriptions","organizations_url":"https://api.github.com/users/spacetelescope/orgs","repos_url":"https://api.github.com/users/spacetelescope/repos","events_url":"https://api.github.com/users/spacetelescope/events{/privacy}","received_events_url":"https://api.github.com/users/spacetelescope/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spacetelescope/asdf-standard","description":"Standards document describing ASDF, Advanced Scientific Data Format","fork":false,"url":"https://api.github.com/repos/spacetelescope/asdf-standard","forks_url":"https://api.github.com/repos/spacetelescope/asdf-standard/forks","keys_url":"https://api.github.com/repos/spacetelescope/asdf-standard/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spacetelescope/asdf-standard/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spacetelescope/asdf-standard/teams","hooks_url":"https://api.github.com/repos/spacetelescope/asdf-standard/hooks","issue_events_url":"https://api.github.com/repos/spacetelescope/asdf-standard/issues/events{/number}","events_url":"https://api.github.com/repos/spacetelescope/asdf-standard/events","assignees_url":"https://api.github.com/repos/spacetelescope/asdf-standard/assignees{/user}","branches_url":"https://api.github.com/repos/spacetelescope/asdf-standard/branches{/branch}","tags_url":"https://api.github.com/repos/spacetelescope/asdf-standard/tags","blobs_url":"https://api.github.com/repos/spacetelescope/asdf-standard/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spacetelescope/asdf-standard/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spacetelescope/asdf-standard/git/refs{/sha}","trees_url":"https://api.github.com/repos/spacetelescope/asdf-standard/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spacetelescope/asdf-standard/statuses/{sha}","languages_url":"https://api.github.com/repos/spacetelescope/asdf-standard/languages","stargazers_url":"https://api.github.com/repos/spacetelescope/asdf-standard/stargazers","contributors_url":"https://api.github.com/repos/spacetelescope/asdf-standard/contributors","subscribers_url":"https://api.github.com/repos/spacetelescope/asdf-standard/subscribers","subscription_url":"https://api.github.com/repos/spacetelescope/asdf-standard/subscription","commits_url":"https://api.github.com/repos/spacetelescope/asdf-standard/commits{/sha}","git_commits_url":"https://api.github.com/repos/spacetelescope/asdf-standard/git/commits{/sha}","comments_url":"https://api.github.com/repos/spacetelescope/asdf-standard/comments{/number}","issue_comment_url":"https://api.github.com/repos/spacetelescope/asdf-standard/issues/comments{/number}","contents_url":"https://api.github.com/repos/spacetelescope/asdf-standard/contents/{+path}","compare_url":"https://api.github.com/repos/spacetelescope/asdf-standard/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spacetelescope/asdf-standard/merges","archive_url":"https://api.github.com/repos/spacetelescope/asdf-standard/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spacetelescope/asdf-standard/downloads","issues_url":"https://api.github.com/repos/spacetelescope/asdf-standard/issues{/number}","pulls_url":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls{/number}","milestones_url":"https://api.github.com/repos/spacetelescope/asdf-standard/milestones{/number}","notifications_url":"https://api.github.com/repos/spacetelescope/asdf-standard/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spacetelescope/asdf-standard/labels{/name}","releases_url":"https://api.github.com/repos/spacetelescope/asdf-standard/releases{/id}","created_at":"2014-03-25T19:13:57Z","updated_at":"2015-05-05T12:53:11Z","pushed_at":"2015-06-01T19:04:03Z","git_url":"git://github.com/spacetelescope/asdf-standard.git","ssh_url":"git@github.com:spacetelescope/asdf-standard.git","clone_url":"https://github.com/spacetelescope/asdf-standard.git","svn_url":"https://github.com/spacetelescope/asdf-standard","homepage":"http://asdf-standard.readthedocs.org/","size":2558,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":16,"forks":7,"open_issues":16,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/87"},"html":{"href":"https://github.com/spacetelescope/asdf-standard/pull/87"},"issue":{"href":"https://api.github.com/repos/spacetelescope/asdf-standard/issues/87"},"comments":{"href":"https://api.github.com/repos/spacetelescope/asdf-standard/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spacetelescope/asdf-standard/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/spacetelescope/asdf-standard/statuses/1526b2f5d25722c4addfe01f2311eaf95481878c"}}}}