{
  "id": 400719,
  "title": "Geometrical precision",
  "url": "/competitions/icecube-neutrinos-in-deep-ice/discussion/400719",
  "author_name": "",
  "post_date": "2023-04-09T23:52:40.979931400Z",
  "votes": 4,
  "comment_count": 2,
  "views": 0,
  "content": "<p>DOM position precision ~1cm<br>\nMinimum DOM distance about 6.45m (while mean is about 600m)<br>\nSo ~1cm/~10m gives 0.001 radian and that is the limit for precision. Well it is enough to observe from what part of the sun neutrinos come (sun size is about 0.009 radian)<br>\nEven worse the size of DOM is about 0.25cm which gives about 0.025 rad limit for precision (but it can be overpass of course by regression).</p>\n<p><strong>Mean distance:</strong></p>\n<pre><code> pandas  pd\n scipy.spatial.distance  pdist\n\n\ndf = pd.read_csv()\n\n\npoints = df[[, , ]].values\n\n\ndistances = pdist(points)\n\n\nmean_distance = distances.mean()\n\n\n()\n</code></pre>\n<p><strong>Minimum distance:</strong></p>\n<pre><code> pandas  pd\n scipy.spatial.distance  cdist\n\n\ndf = pd.read_csv()\n\n\npoints = df[[, , ]].values\n\n\ndist_matrix = cdist(points, points)\n\n\ndist_matrix[np.diag_indices(dist_matrix.shape[])] = np.inf\n\n\nidx1, idx2 = np.unravel_index(dist_matrix.argmin(), dist_matrix.shape)\n\n\nid1, id2 = df.loc[[idx1, idx2], ].values\n\n\ndistance = dist_matrix.()\n\n\n()\n</code></pre>",
  "messages": [
    {
      "id": "2216263",
      "postDate": "04/09/2023 23:52:40",
      "content": "<p>DOM position precision ~1cm<br>\nMinimum DOM distance about 6.45m (while mean is about 600m)<br>\nSo ~1cm/~10m gives 0.001 radian and that is the limit for precision. Well it is enough to observe from what part of the sun neutrinos come (sun size is about 0.009 radian)<br>\nEven worse the size of DOM is about 0.25cm which gives about 0.025 rad limit for precision (but it can be overpass of course by regression).</p>\n<p><strong>Mean distance:</strong></p>\n<pre><code> pandas  pd\n scipy.spatial.distance  pdist\n\n\ndf = pd.read_csv()\n\n\npoints = df[[, , ]].values\n\n\ndistances = pdist(points)\n\n\nmean_distance = distances.mean()\n\n\n()\n</code></pre>\n<p><strong>Minimum distance:</strong></p>\n<pre><code> pandas  pd\n scipy.spatial.distance  cdist\n\n\ndf = pd.read_csv()\n\n\npoints = df[[, , ]].values\n\n\ndist_matrix = cdist(points, points)\n\n\ndist_matrix[np.diag_indices(dist_matrix.shape[])] = np.inf\n\n\nidx1, idx2 = np.unravel_index(dist_matrix.argmin(), dist_matrix.shape)\n\n\nid1, id2 = df.loc[[idx1, idx2], ].values\n\n\ndistance = dist_matrix.()\n\n\n()\n</code></pre>",
      "rawMarkdown": "DOM position precision ~1cm\nMinimum DOM distance about 6.45m (while mean is about 600m)\nSo ~1cm/~10m gives 0.001 radian and that is the limit for precision. Well it is enough to observe from what part of the sun neutrinos come (sun size is about 0.009 radian)\nEven worse the size of DOM is about 0.25cm which gives about 0.025 rad limit for precision (but it can be overpass of course by regression).\n\n**Mean distance:**\n```python\nimport pandas as pd\nfrom scipy.spatial.distance import pdist\n\n# Load the geometry.csv file into a pandas dataframe\ndf = pd.read_csv('geometry.csv')\n\n# Extract the x, y, and z coordinates as a numpy array\npoints = df[['x', 'y', 'z']].values\n\n# Calculate the pairwise distances using the Euclidean distance metric\ndistances = pdist(points)\n\n# Calculate the mean distance between all pairs of distinct points\nmean_distance = distances.mean()\n\n# Print the mean distance\nprint(f\"The mean distance between all pairs of distinct points is {mean_distance:.2f}.\")\n```\n**Minimum distance:**\n```python\nimport pandas as pd\nfrom scipy.spatial.distance import cdist\n\n# Load the geometry.csv file into a pandas dataframe\ndf = pd.read_csv('icecube-neutrinos-in-deep-ice/sensor_geometry.csv')\n\n# Extract the x, y, and z coordinates as a numpy array\npoints = df[['x', 'y', 'z']].values\n\n# Calculate the distance matrix using the Euclidean distance metric\ndist_matrix = cdist(points, points)\n\n# Set the diagonal elements to infinity to avoid selecting the same id\ndist_matrix[np.diag_indices(dist_matrix.shape[0])] = np.inf\n\n# Find the indices of the two closest ids in the distance matrix\nidx1, idx2 = np.unravel_index(dist_matrix.argmin(), dist_matrix.shape)\n\n# Get the id values corresponding to the two closest indices\nid1, id2 = df.loc[[idx1, idx2], 'sensor_id'].values\n\n# Get the distance between the two closest points\ndistance = dist_matrix.min()\n\n# Print the two closest ids and their distance\nprint(f\"The two closest ids are {id1} and {id2}, with a distance of {distance:.2f}.\")\n```",
      "votes": null
    },
    {
      "id": "2216281",
      "postDate": "04/10/2023 00:32:22",
      "content": "<p>thx for sharing👀</p>",
      "rawMarkdown": "thx for sharing👀",
      "votes": null
    },
    {
      "id": "2221293",
      "postDate": "04/14/2023 05:55:23",
      "content": "<p>I wonder if there are other factors that affect the neutrino detection precision, such as the angular resolution of the Cherenkov photons, the energy and flavor of the neutrinos, and the background noise from other sources.</p>",
      "rawMarkdown": "I wonder if there are other factors that affect the neutrino detection precision, such as the angular resolution of the Cherenkov photons, the energy and flavor of the neutrinos, and the background noise from other sources.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2216281,
      "author_name": "mjx000",
      "author_url": "",
      "post_date": "04/10/2023 00:32:22",
      "content": "<p>thx for sharing👀</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2221293,
      "author_name": "yus002",
      "author_url": "",
      "post_date": "04/14/2023 05:55:23",
      "content": "<p>I wonder if there are other factors that affect the neutrino detection precision, such as the angular resolution of the Cherenkov photons, the energy and flavor of the neutrinos, and the background noise from other sources.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2216263": "DOM position precision ~1cm\nMinimum DOM distance about 6.45m (while mean is about 600m)\nSo ~1cm/~10m gives 0.001 radian and that is the limit for precision. Well it is enough to observe from what part of the sun neutrinos come (sun size is about 0.009 radian)\nEven worse the size of DOM is about 0.25cm which gives about 0.025 rad limit for precision (but it can be overpass of course by regression).\n\n**Mean distance:**\n```python\nimport pandas as pd\nfrom scipy.spatial.distance import pdist\n\n# Load the geometry.csv file into a pandas dataframe\ndf = pd.read_csv('geometry.csv')\n\n# Extract the x, y, and z coordinates as a numpy array\npoints = df[['x', 'y', 'z']].values\n\n# Calculate the pairwise distances using the Euclidean distance metric\ndistances = pdist(points)\n\n# Calculate the mean distance between all pairs of distinct points\nmean_distance = distances.mean()\n\n# Print the mean distance\nprint(f\"The mean distance between all pairs of distinct points is {mean_distance:.2f}.\")\n```\n**Minimum distance:**\n```python\nimport pandas as pd\nfrom scipy.spatial.distance import cdist\n\n# Load the geometry.csv file into a pandas dataframe\ndf = pd.read_csv('icecube-neutrinos-in-deep-ice/sensor_geometry.csv')\n\n# Extract the x, y, and z coordinates as a numpy array\npoints = df[['x', 'y', 'z']].values\n\n# Calculate the distance matrix using the Euclidean distance metric\ndist_matrix = cdist(points, points)\n\n# Set the diagonal elements to infinity to avoid selecting the same id\ndist_matrix[np.diag_indices(dist_matrix.shape[0])] = np.inf\n\n# Find the indices of the two closest ids in the distance matrix\nidx1, idx2 = np.unravel_index(dist_matrix.argmin(), dist_matrix.shape)\n\n# Get the id values corresponding to the two closest indices\nid1, id2 = df.loc[[idx1, idx2], 'sensor_id'].values\n\n# Get the distance between the two closest points\ndistance = dist_matrix.min()\n\n# Print the two closest ids and their distance\nprint(f\"The two closest ids are {id1} and {id2}, with a distance of {distance:.2f}.\")\n```",
    "2216281": "thx for sharing👀",
    "2221293": "I wonder if there are other factors that affect the neutrino detection precision, such as the angular resolution of the Cherenkov photons, the energy and flavor of the neutrinos, and the background noise from other sources."
  },
  "source": "meta"
}