Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Part of my script to make two signals the same length
SI_dispersion = check_energy_dispersion(bss_spectra[0])
bin_mlls = False
bin_factor = 1
for s in mlls_objects:
mlls_dispersion = check_energy_dispersion(s)
if SI_dispersion > mlls_dispersion:
bin_mlls = True
if SI_dispersion / mlls_dispersion > bin_factor:
bin_factor = int(SI_dispersion / mlls_dispersion)
if bin_mlls == True:
for i in range(len(mlls_objects)):
mlls_objects[i] = mybin(s = mlls_objects[i], sbin = bin_factor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment