Week 3 (07/25-07/29)
Tuesday
- Reorganized my Harvard Wiki page a little bit:
- Questions for Rubin Obs. → page to list questions about inconsistencies in data from AuxTel
- Data Clipping → page to keep track of how I am processing the data
- Stubbs Notes → page to keep track of Stubbs' comments/additions to my page
- Task Lists → page to log what I need to do, instead of putting it into the lab notebook
- Lab Notebook is now organized by week
- Completed the "Basic Instruction" for machine shop training and sent out the certificate–waiting to hear more info about the RED certification class potentially next Wednesday.
- Worked on Data_Clipping Jupyter Notebook to clean up code and commenting
Finding Covariances for Coefficients of Polynomial and Linear Models
- In Data_Clipping.ipynb
- worked on finding the covariances of the coefficients of the polynomial and linear model
- For the linear model, I used np.polyfit(airmasses, eq_widths, 1, cov=True). Returns coeffs in order of highest power and covariance matrix where diagonal values are the covariances of each of the coeffs
- created func to extract diagonal values and store them
- For polynomial func ax^(1/2) + bx + c, used curve_fit from scipy, also extract diagonal values from covariance matrix to each coeff
- Created a table that gives the polynomial model and linear model for each molecule on each night and each star
- Errors:
- Many times got complaints of errors with varying sizes, particularly when trying to use curve_fit for the linear model. Resolved by sticking with np.polyfit
- Insufficient data from
$H_2 O$ HD111980 2022-06-29 spec_data_2022062800077.fits
to find the best polynomial fit model (there were only two valid data points)- For the same file, could not get the covariance matrix (insufficient data)
Wednesday
Finding independence of molecule eq_widths against night/star
- Worked on the following sanity checks:
- Oxygen → independent of star and night
- Hydrogen → independent of night, plotted against H//alpha and H//beta
- Water → independent of star
- When I looked at independence of molecule stars, I plot all eq_widths of stars against airmass on a given night
- When I looked at independence of molecule and night, I plot all eq_widths of molecule for each star
- Mimicked code from Data_Clipping.ipynb in new nb Mol_Independence.ipynb
- Created a function that takes in the molecule in question ('$O_2$', "$H_2 O$', etc.) and the needed independence factor (ie. "date", "star") and outputs:
- any errors (No HDU table, neg eq_width)
- table of linear model and covariance of coefficients for each star or date
- scatterplots for airmass and eq_width
Here are the results of running Jupyter nb Mol_Independence.ipynb:
Oxygen Indep of Star
Oxygen Indep of Date
H//alpha indep of night
H//beta indep of night
H//beta indep of star
Thursday
Adding Error Bars / Error Shading Bars
- Worked on adding the error bars to the data using mpl. I remembered midway trying to figure out error bars that in previous meeting Chris mentioned that the error reported on the equivalent widths were not provided (and something we should ask about).
- Still managed to plot the standard error of all the eq_widths, the error bars were incredibly large when taking std/ sqrt(n). Talked with Eske, and he recommended that I only plot std, which made error bars look much nicer
- Worked on applying error shading bands on the data, and it looks a bit clunky, will need to figure out how to plot the error bar shading bands in numerical order (may require ordering the list of airmasses, but then I have to also order the list of eq_widths)
- Also, weirdly the molecule data for O2 became orange. Currently working in the Mol_independence.ipynb to add error shading bars
- Next steps to consider: fix orange O2, fix error shading bands, find R^2 values for the linear fits, and do preliminary statistical analysis for independence (using the linear fits). Also can start extension project
Friday
Re-doing linear fits with scipy, getting r^2 values
- Re-did the linear fits, this time using scipy.stats.linregress instead of np.poly_fit
- scipy easily gives the r^2 value, but np.poly_fit gives the covariance of each variable coefficient. Overall, I prefer using scipy.stats.linregress, easier to index into
- For finding the independence of specific air molecules against each star or night, I added the linear fit model and I wrote down the model and r^2 value on each plot.
- It looks like the linear fits are pretty weak for the data because the spreads are so high, and the r^2 values are pretty close to zero, so I'm not sure if I can use the linear model to determine independence between the air molecules eq_widths and airmass
- Example data plots, note very low r^2 values
Plotting Atm Absorption Regions Unaffected by Mol Wavelengths
- Plotted the atm absorption of light against flux of star for all files. Example file:
- When doing a quick scan of the plots, noticed a faulty file included in the data set:
The file had previous missing data, not sure what is going on here. "spec_data_2022062800320.fits"
Copyright © 2024 The President and Fellows of Harvard College * Accessibility * Support * Request Access * Terms of Use