Skip to content

Instantly share code, notes, and snippets.

@thomasaarholt
Created June 7, 2016 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasaarholt/95321e7edea3a129dbd43875aae22d1d to your computer and use it in GitHub Desktop.
Save thomasaarholt/95321e7edea3a129dbd43875aae22d1d to your computer and use it in GitHub Desktop.
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)
print(bin_factor)
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