Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files for running the beast on XSEDE #20

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
256 changes: 256 additions & 0 deletions metal_xsede/beast_settings_LMC_mastergrid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
import numpy as np

from astropy import units

# BEAST imports
from beast.physicsmodel.stars import isochrone
from beast.physicsmodel.stars import stellib
from beast.physicsmodel.dust import extinction
from beast.observationmodel.noisemodel import absflux_covmat

#from extra_filters import make_integration_filter, make_top_hat_filter

#-----------------------------------------------------------------
# User inputs [sec:conf]
#-----------------------------------------------------------------
# Parameters that are required to make models
# and to fit the data
#-----------------------------------------------------------------
# AC == authomatically created
# indicates where user's input change is NOT necessary/recommeded
#-----------------------------------------------------------------

# project : string
# the name of the output results directory
project = "mastergrid_LMC"

# name of the survey
# used for the creation of the unique name for each source
surveyname = 'METAL'

# filters : list of strings
# full filter names in BEAST filter database
filters = [
'HST_WFC3_F225W',
'HST_WFC3_F275W',
'HST_WFC3_F336W',
'HST_WFC3_F475W',
'HST_ACS_WFC_F475W',
'HST_WFC3_F814W',
'HST_ACS_WFC_F814W',
'HST_WFC3_F110W',
'HST_WFC3_F128N',
'HST_WFC3_F160W'
]

# basefilters : list of strings
# short names for filters
basefilters = []

# obs_colnames : list of strings
# names of columns for filters in the observed catalog
# need to match column names in the observed catalog,
# input data MUST be in fluxes, NOT in magnitudes
# fluxes MUST be in normalized Vega units
obs_colnames = [ f.upper() + '_RATE' for f in basefilters ]

# obsfile : string
# pathname of the observed catalog
obsfile = " "

#------------------------------------------------------
# Artificial Star Test Input File Generation Parameters
#------------------------------------------------------

# ast_models_selected_per_age : integer
# Number of models to pick per age (Default = 70).
ast_models_selected_per_age = 70 # NOT USED in flux bin method

# ast_bands_above_maglimit : integer
# Number of filters that must be above the magnitude limit
# for an AST to be included in the list (Default = 3)
ast_bands_above_maglimit = 3 # NOT USED in flux bin method

# ast_n_flux_bins : integer
# The number of flux bins into which the dynamic range of the
# model grid in each filter is divided
ast_n_flux_bins = 40

# ast_n_per_flux_bin : integer
# Minimum number of model seds that need to fall into each bin
ast_n_per_flux_bin = 50

# ast_realization_per_model : integer
# Number of Realizations of each included AST model
# to be put into the list. (Default = 20)
ast_realization_per_model = 1 # for the toothpick model (NOT truncheon)


# ast_maglimit : float (single value or array with one value per filter)
# (1) option 1: [number] to change the number of mags fainter than
# the 90th percentile
# faintest star in the photometry catalog to be used for
# the mag cut.
# (Default = 1)
# (2) option 2: [space-separated list of numbers] to set custom faint end limits
# (one value for each band).
ast_maglimit = [1.] # NOT USED for this production run

# ast_with_positions : (bool,optional)
# If True, the ast list is produced with X,Y positions.
# If False, the ast list is produced with only magnitudes.
ast_with_positions = True

# ast_source_density_table : (string,optional)
# Name of source density table from tools/create_source_density_map.py
# If supplied, the ASTs will be repeated for each source density bin in the table
ast_density_table = None
# ast_source_density_table = 'data/b15_4band_det_27_A_sourcedens_map.hd5'

#ast_N_bins : (int, optional)
#Number of source or background bins that you want ASTs repeated over
ast_N_bins = 4


# ast_pixel_distribution : float (optional)
# (Used if ast_with_positions is True), minimum pixel separation between AST
# position and catalog star used to determine the AST spatial distribution
ast_pixel_distribution = 10.0

# ast_reference_image : string (optional, but required if ast_with_positions
# is True and no X and Y information is present in the photometry catalog)
# Name of the reference image used by DOLPHOT when running the measured
# photometry.
ast_reference_image = " "

# ast_coord_boundary : None, or list of two arrays (optional)
# If supplied, these RA/Dec coordinates will be used to limit the region
# over which ASTs are generated. Input should be list of two arrays, the
# first RA and the second Dec, ordered sequentially around the region
# (either CW or CCW).
ast_coord_boundary = None


#-------------------------------------------
#Noise Model Artificial Star Test Parameters
#-------------------------------------------

# astfile : string
# pathname of the AST files (single camera ASTs)
astfile = " "

# ast_colnames : list of strings
# names of columns for filters in the AST catalog (AC)
ast_colnames = np.array(basefilters)

# noisefile : string
# create a name for the noise model
noisefile = project + '/' + project + '_noisemodel.hd5'

# absflux calibration covariance matrix for HST specific filters (AC)
absflux_a_matrix = absflux_covmat.hst_frac_matrix(filters)

#-------------------------------------------
#Grid
#-------------------------------------------

# n_subgrid : integer
# Number of sub-grids to use (1 means no subgrids). These are
# useful when the physics model grid is too large to read into
# memory.
n_subgrid = 10

################

### Distance/Velocity

# Distances: distance to the galaxy [min, max, step] or [fixed number]
# (Shaefer 2008, Haschke et al 2012)
distances = [40, 60, 2.5]
distance_prior_model = {'name': 'flat'}

# Distance unit (any length or units.mag)
distance_unit = units.kpc

# velocity of galaxy
# (van der Marel et al 2002)
velocity = 262.2 * units.km / units.s

################

### Stellar grid definition

# log10(Age) -- [min,max,step] to generate the isochrones in years
# example [6.0, 10.13, 1.0]
logt = [6.0, 10.13, 0.1]
age_prior_model = {'name': 'flat'}

# note: Mass is not sampled, instead the isochrone supplied
# mass spacing is used instead
mass_prior_model = {"name": "kroupa"}

# Metallicity : list of floats
# Here: Z == Z_initial, NOT Z(t) surface abundance
# PARSECv1.2S accepts values 1.e-4 < Z < 0.06
# the master grid is log Z = -2.1 to 0.3 in steps of 0.3
# the PARSEC models have Z_sun = 0.0152
z = (
10 ** np.array([-2.1, -1.8, -1.5, -1.2, -0.9, -0.6, -0.3]) * 0.0152
).tolist()
met_prior_model = {"name": "flat"}

# Isochrone Model Grid
# Current Choices: Padova or MIST
# PadovaWeb() -- `modeltype` param for iso sets from ezpadova
# (choices: parsec12s_r14, parsec12s, 2010, 2008, 2002)
# MISTWeb() -- `rotation` param (choices: vvcrit0.0=default, vvcrit0.4)
#
# Default: PARSEC+CALIBRI
oiso = isochrone.PadovaWeb()
# Alternative: PARSEC1.2S -- old grid parameters
#oiso = isochrone.PadovaWeb(modeltype='parsec12s', filterPMS=True)
# Alternative: MIST -- v1, no rotation
#oiso = isochrone.MISTWeb()

# Stellar Atmospheres library definition
osl = stellib.Tlusty() + stellib.Kurucz()

################

### Dust extinction grid definition
extLaw = extinction.Generalized_RvFALaw(ALaw=extinction.Generalized_DustExt(curve='F19'), BLaw=extinction.Generalized_DustExt(curve='G03_SMCBar'))
#extLaw = extinction.Gordon16_RvFALaw()

# A(V): dust column in magnitudes
# acceptable avs > 0.0
# example [min, max, step] = [0.0, 10.055, 1.0]
avs = [0.01, 10.0, 0.05]
av_prior_model = {'name': 'flat'}
#av_prior_model = {'name': 'lognormal',
# 'max_pos': 2.0,
# 'sigma': 1.0,
# 'N': 10.}

# R(V): dust average grain size
# example [min, max, step] = [2.0,6.0,1.0]
rvs = [2.0, 6.0, 0.5]
rv_prior_model = {'name': 'flat'}
#rv_prior_model = {'name': 'lognormal',
# 'max_pos': 2.0,
# 'sigma': 1.0,
# 'N': 10.}

# fA: mixture factor between "MW" and "SMCBar" extinction curves
# example [min, max, step] = [0.0,1.0, 0.25]
fAs = [0.0, 1.0, 0.2]
fA_prior_model = {'name': 'flat'}
#fA_prior_model = {'name': 'lognormal',
# 'max_pos': 0.5,
# 'sigma': 0.2,
# 'N': 10.}

################

# add in the standard filters to enable output of stats and pdf1d values
# for the observed filters (AC)
add_spectral_properties_kwargs = dict(filternames=filters)
Loading