Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pre-commit

on:
push:
branches:
- master
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: pre-commit/action@v3.0.1
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/kynan/nbstripout
rev: 0.9.1
hooks:
- id: nbstripout
41 changes: 22 additions & 19 deletions DameCube.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
"cells": [
{
"cell_type": "markdown",
"id": "1a9b968c",
"source": "> **Questions or issues?** Please report them on the [tutorials GitHub issues page](https://github.com/radio-astro-tools/tutorials/issues).",
"metadata": {}
"id": "0",
"metadata": {},
"source": [
"> **Questions or issues?** Please report them on the [tutorials GitHub issues page](https://github.com/radio-astro-tools/tutorials/issues)."
]
},
{
"cell_type": "markdown",
"id": "b73f64d0-aa4a-4422-b28d-8e80b20e39ae",
"id": "1",
"metadata": {},
"source": [
"# Identification of the far 3 kpc arm in the Dame 2001 CO map\n",
Expand All @@ -29,6 +31,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -39,7 +42,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7cffa818-9ef1-4e73-affd-6c44e9f8778b",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -54,7 +57,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3af7c5c2-8689-4327-8697-ec2251b2d01e",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -68,7 +71,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f30b33f9-a996-4af3-9f3d-2c28fad69e5a",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -83,7 +86,7 @@
},
{
"cell_type": "markdown",
"id": "df112a14-bb6a-4aed-a404-9870b2466660",
"id": "6",
"metadata": {},
"source": [
"We load up the data and append the 1/8 degree beam (there's no beam in the original data header):"
Expand All @@ -92,7 +95,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f2116162-7896-4dfb-bf2d-cfcf168b6057",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -112,7 +115,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "73d171e5-257e-48a4-a377-02a46a65c126",
"id": "8",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -121,7 +124,7 @@
},
{
"cell_type": "markdown",
"id": "1650ae61-468d-4574-8305-e24c703c550a",
"id": "9",
"metadata": {},
"source": [
"We then create a mask based on the best-fit linear arm model from their Figure 1:\n",
Expand All @@ -132,7 +135,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7294bf39-5792-4f49-b095-501058773aa9",
"id": "10",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -149,7 +152,7 @@
},
{
"cell_type": "markdown",
"id": "53d6f369-e345-4e0d-82de-3589dbe8a256",
"id": "11",
"metadata": {},
"source": [
"Find the corners to cut out of the image to match Fig 3:"
Expand All @@ -158,7 +161,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "fd63d384-fbad-42dd-821e-babae7568068",
"id": "12",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -168,7 +171,7 @@
},
{
"cell_type": "markdown",
"id": "4b8a279c-b1a5-4797-a2bf-997d7b64589d",
"id": "13",
"metadata": {},
"source": [
"Calculate the moment map:"
Expand All @@ -177,7 +180,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "89e82122-8f96-4642-ab8a-87a352cea6f3",
"id": "14",
"metadata": {
"tags": []
},
Expand All @@ -190,7 +193,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "41d6ccca-7a88-42fa-a591-4799cbbc224e",
"id": "15",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -207,7 +210,7 @@
},
{
"cell_type": "markdown",
"id": "3abc2b00-1894-4dc7-bf12-7c1ffe31d5da",
"id": "16",
"metadata": {},
"source": [
"Compare to theirs:\n",
Expand Down Expand Up @@ -237,4 +240,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
Loading
Loading