Spectrum_3 = Spectrum_1/Spectrum_2
, but they have different sizes. How could I proceed? Since I am dealing with spectra, my approach is to decrease the resolution of Spectrum_1
so that the data size matches (if you come from Astrophysics is this a correct approach?). Anyhow, I (think I) need to bin the data from Spectrum_1
in such a way that the size of it matches the size of Spectrum_2
.
arr1.size is 313136
synth_spec2.size is 102888
arr1_new = arr1.reshape(-1,2).mean(axis=1) # should be the answer but
# I don`t fully understand it.
I need
len(arr1_new) == len(synth_spec2) #True