-
Notifications
You must be signed in to change notification settings - Fork 2
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
Calibrator.Fit
output problems
#90
Comments
Hi, the document is a bit outdated as we are preparing for the next major upgrade of rascal. The 7 outputs are:
Hope that helps. |
Thank you for the update.
When will the update be released?
Deguidi Matteo
…On Mon, Jun 12, 2023, 23:20 Marco ***@***.***> wrote:
Hi, the document is a bit outdated as we are preparing for the next major
upgrade of rascal.
The 7 outputs are:
fit_coeff: list
List of best fit polynomial fit_coefficient.
matched_peaks: list
Peaks used for final fit
matched_atlas: list
Atlas lines used for final fit
rms: float
The root-mean-squared of the residuals
residual: float
Residual from the best fit
peak_utilisation: float
Fraction of detected peaks (pixel) used for calibration [0-1].
atlas_utilisation: float
Fraction of supplied arc lines (wavelength) used for
calibration [0-1].
Hope that helps.
—
Reply to this email directly, view it on GitHub
<#90 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AR3DJULIPVB2X5ICJO6FO4LXK6B23ANCNFSM6AAAAAAZAZR3GM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi @mattodeg Currently we don't have a fixed timeline - at least I can't promise a release on a specific date. However we're revamping a lot of the way that Rascal is configured and Atlases are handled, which should things simpler. Are you getting a decent fit currently? Cheers |
Hi @jveitchmichaelis! Yes it seems reasonable, although it recongizes only 20 lines over 330 provided - with IRAF I was able to detect almost every line. But it is just for a small Uni-related project so it doesn't matter too much. I was asking about the release because I may have used it, but don't worry at all. WIsh you the best! |
Hmm maybe @cylammarco has some suggestions there. In theory once you have your fit, you can transform all your lines to detector coordinates and check to see if they line up (even if rascal doesn't "match" them for you). |
Hmm, the peak finding depends on the usage of the find_peaks(). I would try setting the prominence and/or heights arguments to get more peaks. |
How can I tansform lines into detector coordinates? |
Probably easier to go the other way - take your full list of peaks and pass them to |
@jveitchmichaelis, the question was from lines to detector coordinates. Would you recommend using this https://github.com/alvarosg/pynverse on the polynomial function |
Yeah I was going to suggest pynverse, but for a comparison with an atlas I'm not sure it matters which way you go (either you convert peak to wavelength and see, or you try and see where distinct wavelengths would fall). |
Thx for the suggestions - I will try what you said. My main problem is that I'm trying to do a porject previously done with IRAF in Python and the I am struggling with the |
If you can share with us the arc or an image of it, we may be able to give better suggestions. |
I uploaded the images in this folder. Tell me if you have the rights to see the images. The images must be summed together by pairs (like 100097 an 100099). They are calibration images taken using an Iron-Argon lamp. Tell me also if you need other info. https://drive.google.com/drive/folders/1afmIg_wcO11f5hH8hF1TNOL7sy_muDQF?usp=sharing |
Hi, I have not managed to get a good fit yet, but here's the update: By setting the height and prominence to some smaller values, many lines can be recovered
![]() v0.3 doesn't contain the Fe lines, that's why you are getting a very small number of line matches. To get the iron lines, they have to be manually provided. Here is how you can do it: First, get the lines at Then add them and fit:
One caveat here, the wavelength limits of the calibrator do not apply to the manual lines (but the limits for the |
Thanks @mattodeg we're going to try with our newer branch (very beta) which has more extensive built in line lists and some improved atlas handling. Given the line density of your emission spectrum, it's likely that providing a good manual list will yield better results as there are probably too many degenerate (low error) bad fits. Though it may work, one advantage of spectra like this is that maximising the number of recovered lines is normally the best metric to evaluate whether the fit is good or not. We might also be able to fix a couple of lines at each end (since you have good coverage), which will constrain the fit. |
I totally missed the email updates and I want to apologize with both of you. Thanks for the solution and the update, I will try to implement it in my code with your suggestions. Thanks also for developing RASCAL, it is very interesting and does a very promising job" |
Good morning. I am using RASCAL as a tool for line identification and fitting for a project at my University.
I found no problem using the whole MWE provided in the doc, apart form the
fit
function used to fit lines from a spectrum provided by an atlas.The doc -- and the MWE provided there -- suggests to use
fit_coeff, rms, residual, peak_utilisation = c.fit(max_tries=1000, fit_deg=4)
but when I try to run it it gives me an error of too many values to unpack. After few tries I found that it returns only one array, so there is no need to give the 4 variables as before.But when looking better into the array, I discovered it has a length of 7.
So my question is: what are these 7 values?
Thanks.
The text was updated successfully, but these errors were encountered: