{
  "id": 69500,
  "title": "Let's Use Standard Date Times",
  "url": "/competitions/PLAsTiCC-2018/discussion/69500",
  "author_name": "",
  "post_date": "2018-10-24T08:43:33.407550200Z",
  "votes": 5,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Quickest way to munge dates:</p>\n\n<ul>\n<li>from astropy.time import Time</li>\n<li>train['mjd'] = Time(train.mjd.values, format='mjd').iso</li>\n<li>train['mjd'] = pd.to_datetime(train['mjd'])</li>\n</ul>",
  "messages": [
    {
      "id": "409400",
      "postDate": "10/24/2018 08:43:33",
      "content": "<p>Quickest way to munge dates:</p>\n\n<ul>\n<li>from astropy.time import Time</li>\n<li>train['mjd'] = Time(train.mjd.values, format='mjd').iso</li>\n<li>train['mjd'] = pd.to_datetime(train['mjd'])</li>\n</ul>",
      "rawMarkdown": "Quickest way to munge dates:\n    \n\n - from astropy.time import Time\n - train['mjd'] = Time(train.mjd.values, format='mjd').iso\n - train['mjd'] = pd.to_datetime(train['mjd'])",
      "votes": null
    },
    {
      "id": "409732",
      "postDate": "10/24/2018 19:16:01",
      "content": "<p>R (wrong way):\n<code>\ntrain$mjd &lt;- as.Date(train_ts$mjd, origin = '1858-11-17')\n</code></p>\n\n<p>correct way:\n<code>\nlibrary(astroFns)\ntrain$mjd &lt;- dmjd2ut(train$mjd)\n</code></p>",
      "rawMarkdown": "R (wrong way):\n`\ntrain$mjd &lt;- as.Date(train_ts$mjd, origin = '1858-11-17')\n`\n\ncorrect way:\n`\nlibrary(astroFns)\ntrain$mjd &lt;- dmjd2ut(train$mjd)\n`",
      "votes": null
    },
    {
      "id": "409751",
      "postDate": "10/24/2018 19:50:26",
      "content": "<p>The Modified Julian Day was adopted by the Smithsonian Astrophysical Observatory (SAO) in 1957 for satellite tracking.  SAO started tracking satellites\nwith an 8K (non-virtual) 36-bit IBM 704 computer in 1957, when Sputnik was\nlaunched.  The Julian day was 2,435,839 on January 1, 1957.  This is\n11,225,377 in octal notation, which was too big to fit into an 18-bit field\n(half of its standard 36-bit word).  And, with only 8K of memory, no one\nwanted to waste the 14 bits left over by keeping the Julian Day in its own\n36-bit word.  However, they also needed to track hours and minutes, for which\n18 bits gave enough accuracy.  So, they decided to keep the number of days in\nthe left 18 bits and the hours and minutes in the right 18 bits of a word.</p>\n\n<p>Eighteen bits would allow the Modified Julian Day (the SAO day) to grow as\nlarge as 262,143 ((2 ** 18) - 1).  From Nov. 17, 1858, this allowed for seven\ncenturies.  Using only 17 bits, the date could possibly grow only as large as\n131,071, but this still covers 3 centuries, as well as leaving the possibility\nof representing negative time.  The year 1858 preceded the oldest star catalog\nin use at SAO, which also avoided having to use negative time in any of the\nsatellite tracking calculations.</p>\n\n<p><a href=\"https://groups.google.com/forum/#!topic/comp.os.vms/IMWn2Fg46VA\">Original Here</a></p>",
      "rawMarkdown": "The Modified Julian Day was adopted by the Smithsonian Astrophysical Observatory (SAO) in 1957 for satellite tracking.  SAO started tracking satellites\nwith an 8K (non-virtual) 36-bit IBM 704 computer in 1957, when Sputnik was\nlaunched.  The Julian day was 2,435,839 on January 1, 1957.  This is\n11,225,377 in octal notation, which was too big to fit into an 18-bit field\n(half of its standard 36-bit word).  And, with only 8K of memory, no one\nwanted to waste the 14 bits left over by keeping the Julian Day in its own\n36-bit word.  However, they also needed to track hours and minutes, for which\n18 bits gave enough accuracy.  So, they decided to keep the number of days in\nthe left 18 bits and the hours and minutes in the right 18 bits of a word.\n \nEighteen bits would allow the Modified Julian Day (the SAO day) to grow as\nlarge as 262,143 ((2 ** 18) - 1).  From Nov. 17, 1858, this allowed for seven\ncenturies.  Using only 17 bits, the date could possibly grow only as large as\n131,071, but this still covers 3 centuries, as well as leaving the possibility\nof representing negative time.  The year 1858 preceded the oldest star catalog\nin use at SAO, which also avoided having to use negative time in any of the\nsatellite tracking calculations.\n\n[Original Here][1]\n\n\n  [1]: https://groups.google.com/forum/#!topic/comp.os.vms/IMWn2Fg46VA",
      "votes": null
    },
    {
      "id": "417186",
      "postDate": "11/07/2018 23:03:39",
      "content": "<p>Why I found 2022 / 2024 year date ?</p>",
      "rawMarkdown": "Why I found 2022 / 2024 year date ?",
      "votes": null
    },
    {
      "id": "417198",
      "postDate": "11/07/2018 23:33:56",
      "content": "<p>I'll give you two choices\nThey can predict the future or the data is a simulation</p>",
      "rawMarkdown": "I'll give you two choices\nThey can predict the future or the data is a simulation",
      "votes": null
    },
    {
      "id": "422824",
      "postDate": "11/16/2018 20:46:17",
      "content": "<p>Sorry for being late...</p>\n\n<p>Thank you Sir !</p>",
      "rawMarkdown": "Sorry for being late...\n\nThank you Sir !",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 409732,
      "author_name": "sergeylebedev",
      "author_url": "",
      "post_date": "10/24/2018 19:16:01",
      "content": "<p>R (wrong way):\n<code>\ntrain$mjd &lt;- as.Date(train_ts$mjd, origin = '1858-11-17')\n</code></p>\n\n<p>correct way:\n<code>\nlibrary(astroFns)\ntrain$mjd &lt;- dmjd2ut(train$mjd)\n</code></p>",
      "votes": null,
      "replies": [
        {
          "id": 409751,
          "author_name": "scirpus",
          "author_url": "",
          "post_date": "10/24/2018 19:50:26",
          "content": "<p>The Modified Julian Day was adopted by the Smithsonian Astrophysical Observatory (SAO) in 1957 for satellite tracking.  SAO started tracking satellites\nwith an 8K (non-virtual) 36-bit IBM 704 computer in 1957, when Sputnik was\nlaunched.  The Julian day was 2,435,839 on January 1, 1957.  This is\n11,225,377 in octal notation, which was too big to fit into an 18-bit field\n(half of its standard 36-bit word).  And, with only 8K of memory, no one\nwanted to waste the 14 bits left over by keeping the Julian Day in its own\n36-bit word.  However, they also needed to track hours and minutes, for which\n18 bits gave enough accuracy.  So, they decided to keep the number of days in\nthe left 18 bits and the hours and minutes in the right 18 bits of a word.</p>\n\n<p>Eighteen bits would allow the Modified Julian Day (the SAO day) to grow as\nlarge as 262,143 ((2 ** 18) - 1).  From Nov. 17, 1858, this allowed for seven\ncenturies.  Using only 17 bits, the date could possibly grow only as large as\n131,071, but this still covers 3 centuries, as well as leaving the possibility\nof representing negative time.  The year 1858 preceded the oldest star catalog\nin use at SAO, which also avoided having to use negative time in any of the\nsatellite tracking calculations.</p>\n\n<p><a href=\"https://groups.google.com/forum/#!topic/comp.os.vms/IMWn2Fg46VA\">Original Here</a></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 422824,
          "author_name": "pfichou",
          "author_url": "",
          "post_date": "11/16/2018 20:46:17",
          "content": "<p>Sorry for being late...</p>\n\n<p>Thank you Sir !</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 417186,
      "author_name": "simonn94",
      "author_url": "",
      "post_date": "11/07/2018 23:03:39",
      "content": "<p>Why I found 2022 / 2024 year date ?</p>",
      "votes": null,
      "replies": [
        {
          "id": 417198,
          "author_name": "scirpus",
          "author_url": "",
          "post_date": "11/07/2018 23:33:56",
          "content": "<p>I'll give you two choices\nThey can predict the future or the data is a simulation</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "409400": "Quickest way to munge dates:\n    \n\n - from astropy.time import Time\n - train['mjd'] = Time(train.mjd.values, format='mjd').iso\n - train['mjd'] = pd.to_datetime(train['mjd'])",
    "409732": "R (wrong way):\n`\ntrain$mjd &lt;- as.Date(train_ts$mjd, origin = '1858-11-17')\n`\n\ncorrect way:\n`\nlibrary(astroFns)\ntrain$mjd &lt;- dmjd2ut(train$mjd)\n`",
    "409751": "The Modified Julian Day was adopted by the Smithsonian Astrophysical Observatory (SAO) in 1957 for satellite tracking.  SAO started tracking satellites\nwith an 8K (non-virtual) 36-bit IBM 704 computer in 1957, when Sputnik was\nlaunched.  The Julian day was 2,435,839 on January 1, 1957.  This is\n11,225,377 in octal notation, which was too big to fit into an 18-bit field\n(half of its standard 36-bit word).  And, with only 8K of memory, no one\nwanted to waste the 14 bits left over by keeping the Julian Day in its own\n36-bit word.  However, they also needed to track hours and minutes, for which\n18 bits gave enough accuracy.  So, they decided to keep the number of days in\nthe left 18 bits and the hours and minutes in the right 18 bits of a word.\n \nEighteen bits would allow the Modified Julian Day (the SAO day) to grow as\nlarge as 262,143 ((2 ** 18) - 1).  From Nov. 17, 1858, this allowed for seven\ncenturies.  Using only 17 bits, the date could possibly grow only as large as\n131,071, but this still covers 3 centuries, as well as leaving the possibility\nof representing negative time.  The year 1858 preceded the oldest star catalog\nin use at SAO, which also avoided having to use negative time in any of the\nsatellite tracking calculations.\n\n[Original Here][1]\n\n\n  [1]: https://groups.google.com/forum/#!topic/comp.os.vms/IMWn2Fg46VA",
    "417186": "Why I found 2022 / 2024 year date ?",
    "417198": "I'll give you two choices\nThey can predict the future or the data is a simulation",
    "422824": "Sorry for being late...\n\nThank you Sir !"
  },
  "source": "meta"
}