Comparing data sets of different size

In summary: It's definitely not adding or subtracting spectral features, but it is a way of smoothing out any spectral features that might have been present in the original data but were undetectable at the spectral resolution of the instrument.
  • #1
cepheid
Staff Emeritus
Science Advisor
Gold Member
5,199
38
I have two spectra that I'd like to compare. One is the observed spectrum of HD 93521, an O-type star commonly used as a spectrophotometric standard. The other is the known, instrinsic spectrum of this star. By dividing the observed spectrum by the intrinsic one, I will be able to deduce the combined atmospheric and instrumental response of the system on the night that the observing was done.

The problem I am having is more of a comp sci problem. The wavelength arrays for the two spectra have totally different spacings (bin sizes). The observational data varies from about 3111 - 5613 angstroms with 4175 data points, evenly spaced. For the instrinsic spectrum, the wavelengths are NOT evenly spaced (because this is an amalgamation of multiple data sets for this star), and there are only 1919 data points in the wavelength range of interest.

What would be the best way of going about modifying the intrinsic spectrum so that it might be compared to the observed one? I could just interpolate, but then I am worried that I am basically just adding made up data points to the spectrum, and that I might destroy some features of the spectrum (and add some spurious other ones).
 
Astronomy news on Phys.org
  • #2
Okay, maybe some context is needed, since nobody has responded so far.

Here is a portion of the original spectrum: http://img2.imageshack.us/img2/2149/originalm.png

After I use IDL's INTERPOL function to interpolate between these data values so that I have fluxes corresponding to the OTHER wavelength array (the one with a larger number of data points of a different spacing), the result is as follows:

http://img190.imageshack.us/img190/8457/interpolated.png

(crosses are the interpolated data points).

Sure, it looks plausible, but I'm wondering how I could possibly use this spectrum for calibration? These extra data points are not measured, they are just interpolated from the original data. So there's nothing to say that they represent the actual flux values at those wavelengths. On the other hand, I can't think of any other obvious way to compare a spectrum with 1919 data points to one with 4175 data points at entirely different wavelength samples.
 
Last edited by a moderator:
  • #3
I don't know much about astronomy, but I do have some experience comparing data sets.

So there's nothing to say that they represent the actual flux values at those wavelengths. On the other hand, I can't think of any other obvious way to compare a spectrum with 1919 data points to one with 4175 data points at entirely different wavelength samples.

Indeed, interpolation is as far as I know the only sensible method for problems of this type.
Just make sure you use a "safe" interpolation function that does not add any artifacts (e.g splines should probably be avoided). Since you are only doubling the number of points you can probably just use linear interpolation. For the data you linked to i wouldn't worry at all about interpolating to double the number of points.

Of course you can't be sure that there isn't any information "in between" the points; but that information isn't in the data set to start with (since it wasn't measured); by interpolating you are neither adding nor removing any information (but of course you need to keep in mind that the data has been processed).
Interpolation done right is really no different from e.g. filtering data (in the computer or during the measurement), averaging many data sets, smoothing or any of the other "tricks" we use to process data.
 
Last edited:
  • #4
f95toli said:
I don't know much about astronomy, but I do have some experience comparing data sets.

Of course you can't be sure that there isn't any information "in between" the points; but that information isn't in the data set to start with (since it wasn't measured); by interpolating you are neither adding nor removing any information (but of course you need to keep in mind that the data has been processed).
Interpolation done right is really no different from e.g. filtering data (in the computer or during the measurement), averaging many data sets, smoothing or any of the other "tricks" we use to process data.

These comments are really helpful, thank you! I think that IDL's "INTERPOL" function defaults to linear interpolation unless if a keyword is specified amongst the arguments to use quadratic, least squares quadratic, or something called cubic spline. I did not set such a keyword, so I am guessing that linear interpolation was used. I can certainly see what you mean about how this method does not add or subtract any spectral features, it merely smoothes out any that might have been there but were undetectable at the spectral resolution of the instrument.
 
  • #5
You need to know the error bars of both data sets to derive the probability range of calculated values. I agree with f95toli that interpolation is valid.
 

What is the purpose of comparing data sets of different size?

The purpose of comparing data sets of different size is to identify similarities and differences between the data sets and to gain a deeper understanding of the underlying patterns and relationships within the data.

What are the challenges of comparing data sets of different size?

Some of the challenges of comparing data sets of different size include dealing with missing data, accounting for differences in sample size, and ensuring that the data is comparable in terms of measurement units and variables.

How can statistical methods be used to compare data sets of different size?

Statistical methods such as mean, median, and standard deviation can be used to summarize and compare data sets of different size. Additionally, techniques such as regression analysis and hypothesis testing can also be used to compare the relationships and differences between the data sets.

What are some visual tools that can aid in comparing data sets of different size?

Some visual tools that can aid in comparing data sets of different size include bar graphs, box plots, and scatter plots. These graphs can help to visualize the similarities and differences between the data sets and make it easier to identify patterns and relationships.

How can bias be avoided when comparing data sets of different size?

To avoid bias when comparing data sets of different size, it is important to ensure that the data is collected and analyzed in a consistent and unbiased manner. This includes using random sampling techniques, avoiding leading or loaded questions, and using appropriate statistical methods to account for differences in sample size.

Similar threads

Replies
5
Views
935
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
818
  • Astronomy and Astrophysics
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Special and General Relativity
Replies
30
Views
2K
Replies
4
Views
7K
  • Electrical Engineering
Replies
17
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
8
Views
2K
Replies
19
Views
1K
Back
Top