Skip to content

Commit

Permalink
add large vsini flag
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Nov 15, 2024
1 parent b9d0570 commit 6847b36
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions py/rvspecfit/desi/desi_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ def __str__(self):
return self.name


bitmasks = {'CHISQ_WARN': 1, 'RV_WARN': 2, 'RVERR_WARN': 4, 'PARAM_WARN': 8}
bitmasks = {
'CHISQ_WARN': 1, # delta chi-square vs continuum is too larger
'RV_WARN': 2, # rv is to close to the edge
'RVERR_WARN': 4, # RV error is too large
'PARAM_WARN': 8, # parameters are too close to the edge
'VSINI_WARN': 16 # vsini is too large
}


def update_process_status_file(status_fname,
Expand Down Expand Up @@ -361,6 +367,8 @@ def get_rvs_warn(fit_res, outdict, config):
rverr_thresh = 100
# If the error is larger than this we warn

vsini_thresh = 20

rvs_warn = 0

dchisq = outdict['CHISQ_C_TOT'] - outdict['CHISQ_TOT'] # should be >0
Expand All @@ -372,7 +380,8 @@ def get_rvs_warn(fit_res, outdict, config):
if _bad_edge_check(cur_vrad, [config['min_vel'], config['max_vel']],
rvedge_thresh):
rvs_warn |= bitmasks['RV_WARN']

if outdict['VSINI'].to_value(kms) > vsini_thresh:
rvs_warn |= bitmasks['VSINI_WARN']
if (outdict['VRAD_ERR'].to_value(kms) > rverr_thresh):
rvs_warn |= bitmasks['RVERR_WARN']

Expand Down

0 comments on commit 6847b36

Please sign in to comment.