Skip to content

Commit

Permalink
Merge pull request #178 from GreenBankObservatory/veldef_function
Browse files Browse the repository at this point in the history
Doppler frame conversions.
  • Loading branch information
mpound authored Jan 8, 2024
2 parents c011c7a + 64c3fd8 commit 2daab6e
Show file tree
Hide file tree
Showing 24 changed files with 5,126 additions and 6,374 deletions.
2 changes: 1 addition & 1 deletion notebooks/developer/compare_ps_with_weights.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.9.18"
}
},
"nbformat": 4,
Expand Down
8 changes: 4 additions & 4 deletions notebooks/developer/test_OffOn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 2,
"id": "c514b428-dda7-48b8-931f-d93d1ee0f505",
"metadata": {},
"outputs": [],
Expand All @@ -33,7 +33,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 3,
"id": "ece473ba-b84c-41ae-8975-00d1ba4e2bd5",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -346,7 +346,7 @@
"[128 rows x 17 columns]"
]
},
"execution_count": 7,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -493,7 +493,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.9.18"
}
},
"nbformat": 4,
Expand Down
113 changes: 105 additions & 8 deletions notebooks/developer/test_multifits.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@
"id": "556ddf8c-dfcf-4f1b-bd7d-91d373a35e13",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"hiding index\n"
]
},
{
"data": {
"text/html": [
Expand Down Expand Up @@ -148,6 +141,110 @@
"sdf.summary()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "bdb440ea-bb8d-4de1-91e8-be8515fbc9f1",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['OBJECT', 'BANDWID', 'DATE-OBS', 'DURATION', 'EXPOSURE', 'TSYS',\n",
" 'TDIM7', 'TUNIT7', 'CTYPE1', 'CRVAL1', 'CRPIX1', 'CDELT1', 'CTYPE2',\n",
" 'CRVAL2', 'CTYPE3', 'CRVAL3', 'CRVAL4', 'OBSERVER', 'OBSID', 'SCAN',\n",
" 'OBSMODE', 'FRONTEND', 'TCAL', 'VELDEF', 'VFRAME', 'RVSYS', 'OBSFREQ',\n",
" 'LST', 'AZIMUTH', 'ELEVATIO', 'TAMBIENT', 'PRESSURE', 'HUMIDITY',\n",
" 'RESTFREQ', 'FREQRES', 'EQUINOX', 'RADESYS', 'TRGTLONG', 'TRGTLAT',\n",
" 'SAMPLER', 'FEED', 'SRFEED', 'FEEDXOFF', 'FEEDEOFF', 'SUBREF_STATE',\n",
" 'SIDEBAND', 'PROCSEQN', 'PROCSIZE', 'PROCSCAN', 'PROCTYPE', 'LASTON',\n",
" 'LASTOFF', 'TIMESTAMP', 'QD_XEL', 'QD_EL', 'QD_BAD', 'QD_METHOD',\n",
" 'VELOCITY', 'ZEROCHAN', 'DOPFREQ', 'ADCSAMPF', 'VSPDELT', 'VSPRVAL',\n",
" 'VSPRPIX', 'SIG', 'CAL', 'CALTYPE', 'TWARM', 'TCOLD', 'CALPOSITION',\n",
" 'IFNUM', 'PLNUM', 'FDNUM', 'HDU', 'BINTABLE', 'ROW', 'PROC', '_OBSTYPE',\n",
" '_SUBOBSMODE'],\n",
" dtype='object')"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sdf._index.columns"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "4fe1d7a8-2439-4e2d-82ee-45cfc9cd7c7a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 FREQ-OBS\n",
"1 FREQ-OBS\n",
"2 FREQ-OBS\n",
"3 FREQ-OBS\n",
"4 FREQ-OBS\n",
" ... \n",
"123 FREQ-OBS\n",
"124 FREQ-OBS\n",
"125 FREQ-OBS\n",
"126 FREQ-OBS\n",
"127 FREQ-OBS\n",
"Name: CTYPE1, Length: 128, dtype: object"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#sdf._index['TRGTLONG'],sdf._index['CRVAL2']\n",
"sdf._index['VELOCITY']\n",
"sdf._index['CTYPE1']"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "a6ce4fb5-d878-4a2a-94f3-c970889a0a6e",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"WARNING: VerifyWarning: Keyword name 'SUBREF_STATE' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]\n",
"WARNING: VerifyWarning: Keyword name 'TIMESTAMP' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]\n",
"WARNING: VerifyWarning: Keyword name 'QD_METHOD' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]\n",
"WARNING: VerifyWarning: Keyword name 'CALPOSITION' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]\n",
"WARNING: VerifyWarning: Keyword name '_SUBOBSMODE' is greater than 8 characters or contains characters not allowed by the FITS standard; a HIERARCH card will be created. [astropy.io.fits.card]\n",
"WARNING: FITSFixedWarning: 'datfix' made the change 'Set MJD-OBS to 58795.805503 from DATE-OBS'. [astropy.wcs.wcs]\n",
"WARNING: FITSFixedWarning: 'spcfix' made the change 'Changed CTYPE1 from 'FREQ-OBS' to 'FREQ', and SPECSYS to 'TOPOCENT' (VELREF=0)'. [astropy.wcs.wcs]\n"
]
}
],
"source": [
"from astropy.wcs import WCS\n",
"header = sdf._index.iloc[0].dropna().to_dict()\n",
"w=WCS(header=header)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "56b6f510-2e3c-45d3-b502-39dbaa473603",
"metadata": {},
"outputs": [],
"source": [
"set([\"VELOCITY\",\"CRVAL1\", \"FOO\"]) <= header.keys()"
]
},
{
"cell_type": "markdown",
"id": "7fb51add-e1d7-4441-b4f5-ead9ff8aa2a1",
Expand Down Expand Up @@ -380,7 +477,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.9.18"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 2daab6e

Please sign in to comment.