SoniSeries
- class astronify.series.SoniSeries(data, time_col='time', val_col='flux', preview_type='scan')[source]
Bases:
objectClass that encapsulates a sonified data series.
- Parameters:
- data
astropy.table.Table The table of data to be sonified.
- time_colstr
Optional, default “time”. The data column to be mapped to time.
- val_colstr
Optional, default “flux”. The data column to be mapped to pitch.
- preview_typestr
Optional, default “scan”. The mode of preview/gist sonification to make, choice of “ensemble” or “scan”. Ensemble means each section is assigned a different pitch, played separately, then all sections are played together at the end. Scan means each section is assigned to the same pitch value, played separately, and no combined sound is made at the end.
- data
Attributes Summary
The data table (~astropy.table.Table).
Adjustable gain for output.
How long each individual note will be in seconds.
The spacing of the notes on average (will adjust based on time) in seconds.
The pitch mapping object that takes data values to pitch values (Hz).
The data column mappend to time when sonifying.
The data column mappend to putch when sonifying.
Methods Summary
play()Play the data sonification.
Play the sonification in a Jupyter notebook using IPython.display.Audio This matches the original Pyo implementation but uses standard Python libraries.
sonify()Perform the sonification, two columns will be added to the data table: asf_pitch, and asf_onsets.
stop()Stop playing the data sonification.
write(filepath)Save data sonification to the given file.
Attributes Documentation
- data
The data table (~astropy.table.Table).
- gain
Adjustable gain for output.
- note_duration
How long each individual note will be in seconds.
- note_spacing
The spacing of the notes on average (will adjust based on time) in seconds.
- pitch_mapper
The pitch mapping object that takes data values to pitch values (Hz).
- time_col
The data column mappend to time when sonifying.
- val_col
The data column mappend to putch when sonifying.
Methods Documentation
- play_in_notebook()[source]
Play the sonification in a Jupyter notebook using IPython.display.Audio This matches the original Pyo implementation but uses standard Python libraries.
- sonify()[source]
Perform the sonification, two columns will be added to the data table: asf_pitch, and asf_onsets. The asf_pitch column will contain the sonified data in Hz. The asf_onsets column will contain the start time for each note in seconds from the first note. Metadata will also be added to the table giving information about the duration and spacing of the sonified pitches, as well as an adjustable gain.