Page 1 of 2

Version 1-5-4 of PlotSpectra available

Posted: Tue Dec 12, 2017 11:28 pm
by Tim Lester
A new version of PlotSpectra is available here: https://1drv.ms/f/s!AvXqhKI5kEGRjEhdaQ6jaj8AHx_L

This version fixes a bug with the print routine that misplaced the series legends on stacked charts.
It Also adds a new feature (finally got around to it Robin :))
A right click context menu item "Signal/noise" has been added for the main plot.
The S/N is estimated using two spectra of the object that are derived from two equal groups of exposures obtained in the same observing run.
For example if 6 exposures are available then one spectrum could use exposures: 1,3,5 and the other could use exposures: 2,4,6.
One spectrum is used to normalize the other and then a set number of points along the wavelength axis are used to estimate the noise and generate a plot of S/N versu wavelength.

Here is an example for VV Cep that has no smooth regions in the continum for noise evaluation.
First the two spectra derived from exposures 1,3,5 and 2,4,6.
vvcep_20170729_282_tlester.png
And the generated S/N plot ( ignore the fact that y axis still says relative intensity)
vvcep(signal to noise)_20170729_282_tlester.png
The noise estimate used 100 points along the wavelength axis. Note that the noise estimate is very sensitive to any wavelength shifts of strong lines between the two sets of data.
The "noisy" nature of this S/N plot is due in part to the fact that VV Cep has a great many lines at this resolution.
Although it will require care to use and interpret I think this calculation will be useful.

Tim

Re: Version 1-5-4 of PlotSpectra available

Posted: Thu Dec 14, 2017 1:53 pm
by Robin Leadbeater
Thanks Tim ! I will have a play with that. How did you calculate the SNR from the two spectra ?

Cheers
Robin

Re: Version 1-5-4 of PlotSpectra available

Posted: Thu Dec 14, 2017 3:51 pm
by Tim Lester
Robin - After normalizing one spectrum with the other I simply calculate the sdev of a set number of points along the wavelength axis, centred on the wavelength of interest. These values are divided by 2 to represent the noise that would be present if all the exposures had been used and were normalized by a noise free spectrum. The s/n plot uses the inverse of the resulting values, calculated for each point on the wavelength axis.

Tim

Re: Version 1-5-4 of PlotSpectra available

Posted: Fri Dec 15, 2017 5:32 pm
by Francois Teyssier
Thank you, Tim
It works well!
François

Re: Version 1-5-4 of PlotSpectra available

Posted: Sun Dec 24, 2017 3:13 pm
by Ibrahima
Dear Tim.

Is there a documentation or user guide of PlotSpectra available?

Best regards,
Ibrahima.

Re: Version 1-5-4 of PlotSpectra available

Posted: Fri Feb 02, 2018 11:20 pm
by Jack Martin
Tim,

Does this work with windows XP ?

Regards,

Jack

Essex UK

Re: Version 1-5-4 of PlotSpectra available

Posted: Sun Feb 04, 2018 11:41 pm
by Tim Lester
Jack,

Unfortunately PlotSpectra requires Dot Net framework 4.5 or later. Windows XP is not compatible with Dot Net 4.5.

Tim

Re: Version 1-5-4 of PlotSpectra available

Posted: Wed Feb 07, 2018 3:23 pm
by Jack Martin
Tim,

Thanks for your clarification.

Regards,

Jack

Essex UK

Re: Version 1-5-4 of PlotSpectra available

Posted: Sat May 12, 2018 1:59 pm
by Robin Leadbeater
Hi Tim,

Would it be possible to raise the maximum height of the plots? (currently 606 pixels for the main plot (675 if stacked). For some plots eg with a high dynamic range or a stack of spectra a portrait rather than landscape format is more useful.

Thanks
Robin

Re: Version 1-5-4 of PlotSpectra available

Posted: Fri May 18, 2018 10:01 pm
by Tim Lester
Hi Robin,

Sorry for the late reply. The short answer is: I'm sure its possible but it may not be easy. I use the Microsoft .NET charting module. The save plot function only generates a graphic of what is on the screen so I temporarily maximize the window and reduce the other two plot areas to minimum size before saving the plot. This leads to the max sizes you are encountering for a typical display size. I did try to plot the charts to a larger virtual window before saving but I could not get this to work for some reason. I'll work on it again
Remember that under the File menu there is a print menu item. You can print to pdf and some of the pdf print drivers available allow you to generate a png file instead. This may be a work around. I haven't tried it myself.

I have a 4K monitor (well worth the purchase in my opinion) so the max sizes for me are bigger. A better work around. ;)

Tim