{
  "id": 67802,
  "title": "What are the Units of Distmod?",
  "url": "/competitions/PLAsTiCC-2018/discussion/67802",
  "author_name": "",
  "post_date": "2018-10-05T15:11:58.939293Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>What units are \"Distmod\" in? I don't see it in quick scans of the Arxiv paper and the data notes.</p>\n\n<p>Below are what I have found.  However, Google says the maximum distance observable in the universe is 46.6 billion light years, and the maximum in the data set is about 130 billion light years.</p>\n\n<p>I have deduced that the NaNs are for \"in this galaxy\" observations (or rather, null redshift):</p>\n\n<pre><code>(df_train_meta.distmod.isnull() == (df_train_meta.hostgal_photoz==0)).all() #hypothesis confirmed for photoz\n(df_train_meta.distmod.isnull() == (df_train_meta.hostgal_specz==0)).all() #hypothesis confirmed for specz\n</code></pre>\n\n<p>both are true.</p>\n\n<p>But what are the units? I see the non-NaN values are between about 31 and 48.  Megaparsecs? Megalightyears?  Those were my first hypotheses.  Googling for \"distance modulus in astronomy\" suggests this however:</p>\n\n<p>distmod = 5 * log_10 (distance in  parsecs) - 5</p>\n\n<p>Or, distance in parsecs = 10**((distmod+5)/5) (and 3.26156 light years in a parsec)</p>\n\n<p>so, 31 corresponds to 15,848,932 parsecs (51,692,242 ly), and 48 corresponds to 39,810,717,055 parsecs (129,845,042,319 ly).  </p>",
  "messages": [
    {
      "id": "399306",
      "postDate": "10/05/2018 15:11:58",
      "content": "<p>What units are \"Distmod\" in? I don't see it in quick scans of the Arxiv paper and the data notes.</p>\n\n<p>Below are what I have found.  However, Google says the maximum distance observable in the universe is 46.6 billion light years, and the maximum in the data set is about 130 billion light years.</p>\n\n<p>I have deduced that the NaNs are for \"in this galaxy\" observations (or rather, null redshift):</p>\n\n<pre><code>(df_train_meta.distmod.isnull() == (df_train_meta.hostgal_photoz==0)).all() #hypothesis confirmed for photoz\n(df_train_meta.distmod.isnull() == (df_train_meta.hostgal_specz==0)).all() #hypothesis confirmed for specz\n</code></pre>\n\n<p>both are true.</p>\n\n<p>But what are the units? I see the non-NaN values are between about 31 and 48.  Megaparsecs? Megalightyears?  Those were my first hypotheses.  Googling for \"distance modulus in astronomy\" suggests this however:</p>\n\n<p>distmod = 5 * log_10 (distance in  parsecs) - 5</p>\n\n<p>Or, distance in parsecs = 10**((distmod+5)/5) (and 3.26156 light years in a parsec)</p>\n\n<p>so, 31 corresponds to 15,848,932 parsecs (51,692,242 ly), and 48 corresponds to 39,810,717,055 parsecs (129,845,042,319 ly).  </p>",
      "rawMarkdown": "What units are \"Distmod\" in? I don't see it in quick scans of the Arxiv paper and the data notes.\n\nBelow are what I have found.  However, Google says the maximum distance observable in the universe is 46.6 billion light years, and the maximum in the data set is about 130 billion light years.\n\nI have deduced that the NaNs are for \"in this galaxy\" observations (or rather, null redshift):\n\n    (df_train_meta.distmod.isnull() == (df_train_meta.hostgal_photoz==0)).all() #hypothesis confirmed for photoz\n    (df_train_meta.distmod.isnull() == (df_train_meta.hostgal_specz==0)).all() #hypothesis confirmed for specz\n\nboth are true.\n\nBut what are the units? I see the non-NaN values are between about 31 and 48.  Megaparsecs? Megalightyears?  Those were my first hypotheses.  Googling for \"distance modulus in astronomy\" suggests this however:\n\ndistmod = 5 * log_10 (distance in  parsecs) - 5\n\nOr, distance in parsecs = 10**((distmod+5)/5) (and 3.26156 light years in a parsec)\n\nso, 31 corresponds to 15,848,932 parsecs (51,692,242 ly), and 48 corresponds to 39,810,717,055 parsecs (129,845,042,319 ly).",
      "votes": null
    },
    {
      "id": "399377",
      "postDate": "10/05/2018 17:25:02",
      "content": "<p>Formally, the distance modulus has no units since it is a logarithm and the argument to the logarithm must be dimensionless. Astronomers do refer to this quantity with a unit though - just one without dimensions. It is what we call a \"magnitude\". The formula you have:</p>\n\n<p><code>distmod = 5 * log_10 (distance in parsecs) - 5</code> </p>\n\n<p>is indeed correct to convert the distance modulus reported in magnitudes to parsecs. </p>\n\n<p>The distance modulus tends to used more often than the distance in parsecs because we tend to prefer smaller numbers - and the distance in parsecs isn't terribly helpful when we're talking about things that are gigaparsecs away. </p>\n\n<p>Or if you prefer Douglas Adams, “Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space.” </p>\n\n<p>-Gautham on behalf of the PLAsTiCC team</p>",
      "rawMarkdown": "Formally, the distance modulus has no units since it is a logarithm and the argument to the logarithm must be dimensionless. Astronomers do refer to this quantity with a unit though - just one without dimensions. It is what we call a \"magnitude\". The formula you have:\n\n``distmod = 5 * log_10 (distance in parsecs) - 5`` \n\nis indeed correct to convert the distance modulus reported in magnitudes to parsecs. \n\nThe distance modulus tends to used more often than the distance in parsecs because we tend to prefer smaller numbers - and the distance in parsecs isn't terribly helpful when we're talking about things that are gigaparsecs away. \n\nOr if you prefer Douglas Adams, “Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space.” \n\n-Gautham on behalf of the PLAsTiCC team",
      "votes": null
    },
    {
      "id": "399472",
      "postDate": "10/05/2018 21:12:47",
      "content": "<p>Thanks for the info!</p>",
      "rawMarkdown": "Thanks for the info!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 399377,
      "author_name": "gsnarayan",
      "author_url": "",
      "post_date": "10/05/2018 17:25:02",
      "content": "<p>Formally, the distance modulus has no units since it is a logarithm and the argument to the logarithm must be dimensionless. Astronomers do refer to this quantity with a unit though - just one without dimensions. It is what we call a \"magnitude\". The formula you have:</p>\n\n<p><code>distmod = 5 * log_10 (distance in parsecs) - 5</code> </p>\n\n<p>is indeed correct to convert the distance modulus reported in magnitudes to parsecs. </p>\n\n<p>The distance modulus tends to used more often than the distance in parsecs because we tend to prefer smaller numbers - and the distance in parsecs isn't terribly helpful when we're talking about things that are gigaparsecs away. </p>\n\n<p>Or if you prefer Douglas Adams, “Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space.” </p>\n\n<p>-Gautham on behalf of the PLAsTiCC team</p>",
      "votes": null,
      "replies": [
        {
          "id": 399472,
          "author_name": "depmountaineer",
          "author_url": "",
          "post_date": "10/05/2018 21:12:47",
          "content": "<p>Thanks for the info!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "399306": "What units are \"Distmod\" in? I don't see it in quick scans of the Arxiv paper and the data notes.\n\nBelow are what I have found.  However, Google says the maximum distance observable in the universe is 46.6 billion light years, and the maximum in the data set is about 130 billion light years.\n\nI have deduced that the NaNs are for \"in this galaxy\" observations (or rather, null redshift):\n\n    (df_train_meta.distmod.isnull() == (df_train_meta.hostgal_photoz==0)).all() #hypothesis confirmed for photoz\n    (df_train_meta.distmod.isnull() == (df_train_meta.hostgal_specz==0)).all() #hypothesis confirmed for specz\n\nboth are true.\n\nBut what are the units? I see the non-NaN values are between about 31 and 48.  Megaparsecs? Megalightyears?  Those were my first hypotheses.  Googling for \"distance modulus in astronomy\" suggests this however:\n\ndistmod = 5 * log_10 (distance in  parsecs) - 5\n\nOr, distance in parsecs = 10**((distmod+5)/5) (and 3.26156 light years in a parsec)\n\nso, 31 corresponds to 15,848,932 parsecs (51,692,242 ly), and 48 corresponds to 39,810,717,055 parsecs (129,845,042,319 ly).",
    "399377": "Formally, the distance modulus has no units since it is a logarithm and the argument to the logarithm must be dimensionless. Astronomers do refer to this quantity with a unit though - just one without dimensions. It is what we call a \"magnitude\". The formula you have:\n\n``distmod = 5 * log_10 (distance in parsecs) - 5`` \n\nis indeed correct to convert the distance modulus reported in magnitudes to parsecs. \n\nThe distance modulus tends to used more often than the distance in parsecs because we tend to prefer smaller numbers - and the distance in parsecs isn't terribly helpful when we're talking about things that are gigaparsecs away. \n\nOr if you prefer Douglas Adams, “Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space.” \n\n-Gautham on behalf of the PLAsTiCC team",
    "399472": "Thanks for the info!"
  },
  "source": "meta"
}