ptomato / Beams

Open-source laser beam profiling software designed for cheap webcams
MIT License
23 stars 13 forks source link

Beams needs a new maintainer #2

Open ptomato opened 9 years ago

ptomato commented 9 years ago

I don't work in a laser lab anymore, and so I don't have easy access to a laser on which I would test a beam profiler; at the same time the need for a good beam profiler has become less urgent. I haven't done a whole lot of work on Beams over the last year and I suspect someone else could do it better justice.

I would be happy to give any help needed to someone who wanted to take over maintainership of Beams.

rleikis commented 7 years ago

I found your project while browsing on GitHub. I would love to help on this, but probably ought not to. I'm a software engineer and a bit of a laser measurement evangelist at Spiricon for the last ten years, and this would probably be seen as a conflict of interest... I personally value open source and always respect any competition. We very much appreciate that there are teams that can't afford a commercial profiler or simply require a limited feature set from our products. I really think its too bad you (or someone else) can't maintain this project to help those teams that have the time and expertise to use an open source solution.

While looking into your project I found your companion website, and I was disappointed because I noticed you rather demonize Spiricon and Ultracal on your Beams website. Having an inside track on the topic, I believe your statement on your site is in error as we've never tried to hide what Ultracal is, but it made sense for the technique to be patented given fierce competition in the photonics industry. If you don't mind, since it is public information and a topic I openly discuss with our customers anyway, can I elaborate on Ultracal here? I think the following information is a valuable consideration no matter which beam profiler someone uses.

All that Ultracal does is:

  1. Shift the black level up to expose the entire histogram of electronic noise. This is because most camera manufacturers already shift the electronic noise so the median of the noise is at zero.
  2. Create a reference frame by measuring and averaging, pixel-by pixel, the natural electronic noise of the camera.
  3. Subtract, pixel-by-pixel, the reference frame from all received frames.

This technique provides a few distinct benefits over other techniques:

  1. Since the baseline noise is measured while the beam is blocked, and no additional corrections are applied (e.g. smoothing, correction curves, and no magic algorithms), the baseline correction does not affect the signal of the laser unless misused by the user. The result is that frame-by-frame the electronic noise is then neutralized by the actual pixel average, and the resulting baseline histogram is Gaussian and centered about zero counts. Any positive signal from the camera at that time, is from real sources.

If you don't do this, the variation in electronic noise is added to the measurement, reducing its accuracy. If you use a flat clip level you will, more often than not, clip real laser signal from your measurement, as you aren't accurately considering the noise profile of the camera. ISO specification 11146-1 sec 5.2 and 11146-3 sec 3 specify that beam width must use a baseline correction method, which I think you recognize by including your own correction method in your features list.

  1. This technique also has a benefit against ambient light sources that cannot be otherwise excluded. Simply block the laser aperture, and not the camera aperture. The baseline correction frame will include the ambient signal, and only the laser signal will be included in the measurement yielding a more accurate result.

  2. The technique also counteracts the corresponding shift in electronic response with positive (and negative) thermal shift of the camera, which is inevitable. With Ultracal active, you can detect changes in temperature of fractional degrees in your camera. A colleague walking by your camera, or the HVAC turning on ultimately changes the signal response and can affect your measurement.

  3. 4-Sigma beam width measurements are inherently very sensitive to the noise in the baseline, proper correction is paramount. There are other beam width methods which are more resilient to noise, but are either entirely non-ISO or have other tradeoffs in accuracy.

I am meaning to look into what baseline correction method you've chosen to use and I'd love to talk to you if you have any interest. I realize you've long since moved onto other projects.

ptomato commented 7 years ago

@rleikis Thanks for your comments. Apologies that I haven't responded sooner. It is true, I don't pay this project much attention anymore and I would welcome if someone else could take it over. It's a pity because people were just starting to use it in other research groups at the time I left academic research (and thereby lost my easy access to all different sorts of cameras and lasers.)

Thank you for elaborating on Ultracal. (Although, what you describe there is pretty much the same as what Beams already does; there must be more to Ultracal if it was patentable!) I think it's just fine that Spiricon holds a patent for it. However, I believed then and still believe now, that that makes it unsuitable for either peer-reviewed or publicly funded research, and I think Spiricon should be transparent about that. (I congratulate you insofar as your message is exactly the transparency I'm looking for, but where it was really needed was when one of the PIs in my lab bought a bunch of beam profilers from Spiricon, not realizing that they were proprietary!)

I admit I was probably a bit overzealous in singling out Spiricon as it was the example closest to my heart at the time. I've reworded the website, thanks for bringing it to my attention.

I would welcome any comments or suggestions you have on Beams, especially since I can't even remember the details of the baseline correction method by now!

rleikis commented 7 years ago

@ptomato Thanks for the reply, I really appreciate the fairness in your landing page update. I'm looking forward to getting to look at your python implementation and it seems really useful. I'll try to keep you posted.

Kind Regards,

Russell Leikis, KE7VFI rleikis@gmail.com

On Mon, Feb 20, 2017 at 11:11 PM, P. F. Chimento notifications@github.com wrote:

@rleikis https://github.com/rleikis Thanks for your comments. Apologies that I haven't responded sooner. It is true, I don't pay this project much attention anymore and I would welcome if someone else could take it over. It's a pity because people were just starting to use it in other research groups at the time I left academic research (and thereby lost my easy access to all different sorts of cameras and lasers.)

Thank you for elaborating on Ultracal. (Although, what you describe there is pretty much the same as what Beams already does; there must be more to Ultracal if it was patentable!) I think it's just fine that Spiricon holds a patent for it. However, I believed then and still believe now, that that makes it unsuitable for either peer-reviewed or publicly funded research, and I think Spiricon should be transparent about that. (I congratulate you insofar as your message is exactly the transparency I'm looking for, but where it was really needed was when one of the PIs in my lab bought a bunch of beam profilers from Spiricon, not realizing that they were proprietary!)

I admit I was probably a bit overzealous in singling out Spiricon as it was the example closest to my heart at the time. I've reworded the website, thanks for bringing it to my attention.

I would welcome any comments or suggestions you have on Beams, especially since I can't even remember the details of the baseline correction method by now!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ptomato/Beams/issues/2#issuecomment-281254393, or mute the thread https://github.com/notifications/unsubscribe-auth/AJtlhVcPGZGWNZKM3oKxHmJXPIoXYntoks5reoAqgaJpZM4F0n3q .