-
Notifications
You must be signed in to change notification settings - Fork 43
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
Merge dev with main branch to add back in stellar variability and EXOTIC fixes #1244
base: main
Are you sure you want to change the base?
Conversation
…iable star. Closes 1164
… even if they don't match the filter of the observation if needed. Also, some QOL changes.
…etting correctly predicted results, but will continue comparing this version and the previous version on main 3.3.0.
…-enter comp stars and check for variability again. Closes #1094
…s. Not entirely complete. Organized some code a bit for clarity.
…ng warning font if a variable star is detected as one of the user-entered comp stars.
Issue 1235: Changing fitting prior from a/Rs to inc
…so, fixed bug regarding how time is accessed from residual results.
…rtions of OOT data being masked, causing multiple sections to be appear.
… variability code. Also, reorganizing for clarity.
Issue 1229: Bug for removing variable stars
Issue 1164: Printing variable star name and coordinates
Issue 1240, 1094, 1067: Bringing back AID Uploads
exotic/exotic.py
Outdated
def vsp_query(file, axis, obs_filter, img_scale, maglimit=14): | ||
stars_count = 0 | ||
comp_stars = {} | ||
def vsp_query(file, axis, obs_filter, img_scale, user_comp_stars, maglimit=14): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding an arg here breaks the API. We may want to up the version by a major number (or to mid-minor, e.g. 3.5.x? to indicate that) or add it to the end of the method arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in PR #1248
return True | ||
return False | ||
except Exception: | ||
return False | ||
|
||
|
||
def check_for_variable_stars(ra_wcs, dec_wcs, comp_ra_dec, comp_stars): | ||
for i, comp_star in enumerate(comp_stars[:]): | ||
ra = ra_wcs[int(comp_star[1])][int(comp_star[0])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If those values don't exist then this method will throw an index exception. Are these exceptions handled by calling methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point: defensive programming
def stellar_variability(ref_flux, lmfit, times, comp_stars, id, vsp_comp_stars, vsp_ind, best_comp, save, s_name): | ||
ref_comp = {} | ||
idx_list, vsp_params = [], [] | ||
def stellar_variability(fit_lc_refs, fit_lc_best, comp_stars, vsp_comp_stars, vsp_ind, best_comp, save, s_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be exception handling here? This comment would apply to other new methods, also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in PR #1248
exotic/exotic.py
Outdated
@@ -1566,7 +1572,7 @@ def realTimeReduce(i, target_name, p_dict, info_dict, ax): | |||
ax.plot(timeList, norm_flux, 'bo') | |||
|
|||
|
|||
def fit_lightcurve(times, tFlux, cFlux, airmass, ld, pDict): | |||
def fit_lightcurve(times, jd_times, tFlux, cFlux, airmass, ld, pDict): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar comment here re method signature. In this instance it could possibly impact CITISENS as I think this method is called. @pearsonkyle @tamimfatahi Comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will at it to the end to resolve this issue. CITISENS won't have any impact if so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in PR #1248
exotic/inputs.py
Outdated
@@ -507,8 +507,9 @@ def comparison_star_coords(comp_stars, rt_bool): | |||
all(isinstance(star, list) for star in comp_stars): | |||
comp_stars = [star for star in comp_stars if star != []] | |||
elif isinstance(comp_stars, str) and any(str.isdigit(x) for x in comp_stars): | |||
comp_stars = ' '.join(re.sub('\D', ' ', comp_stars).split()).split(' ') | |||
comp_stars = [[int(comp_stars[i]), int(comp_stars[i+1])] for i in range(0, len(comp_stars), 2)] | |||
comp_stars = re.findall(r"[-+]?(?:\d*\.*\d+)", comp_stars) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the non-capturing group, it seems to allow '.'. I was wondering if it was intentional to capture a group starting with a decimal. (Maybe \d+
or \d{1,3}
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may be a little safer: '\d*.?\d+'. (limits to single decimal or none)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in PR #1248
class VSPOutputFiles: | ||
def __init__(self, fit, p_dict, i_dict, vsp_params): | ||
class AIDOutputFiles: | ||
def __init__(self, fit, p_dict, i_dict, auid, chart_id, vsp_params): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method signature changes ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name change sounds appropriate. Options are to increase major version but that's a bit dramatic. If we version up to 3.5.0 then it indicates itself a semi-major change. So, set version up to 3.5.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in PR #1248
@jpl-jengelke and @tamimfatahi - please let me know when you're ready for me to approve this PR |
…tries, updated linear fitter on how it checks for given labels, modified exotic.py for to take into account API handling. Version bump to 3.5.0 to indicate minor/major release of method signature changes
@jpl-jengelke and @tamimfatahi - please let me know when you're ready for me to approve this PR |
(astropy already supports, so just need extension)
Add support for fpack based extensions
Solving develop branch issues
No description provided.