Skip to content

Instantly share code, notes, and snippets.

View keflavich's full-sized avatar

Adam Ginsburg keflavich

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
%% 1998/08/12 J Baker
%% Tweaked by hand to get correct results for ApJ. Added functions from
%% astrobib.
%%
%% This is file `apj.bst',
%% generated with the docstrip utility.
%%
%% The original source files were:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
server=$1
port=$2
user=$3
gateway_user=$4
gateway=$5
if [[ -z $user ]]; then
user=$USER
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from astropy import units as u
import os
import re
from astropy.extern.ply import lex,yacc
tokens = (
'NAME',
'OPEN_PAREN',
'CLOSE_PAREN',
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
1. Need to write temperature, density, velocity, grid
2. Need to copy over dust opacity
3. Compute the line populations first:
(need to set lines_mode = 3 before doing this)
radmc3d calcpop
4. Then compute the "image":
radmc3d image iline 1 widthkms 10 linenlam 40 linelist nostar
import numpy as np
from astropy import table
from astropy.table import Table
tbl = Table.read('jimdale_runi_dualfb.txt', format='ascii.basic')
rowdict = {ii:[] for ii in range(8)}
for row in tbl:
tstep=int(row['Run_angle_timestep'][-1])
rowdict[tstep].append(row)