SoniSeries

class astronify.series.SoniSeries(data, time_col='time', val_col='flux')[source]

Bases: object

Class that encapsulates a sonified data series.

Parameters
dataastropy.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.

Attributes Summary

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 Summary

play()

Play the data sonification.

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()[source]

Play the data sonification.

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.

stop()[source]

Stop playing the data sonification.

write(filepath)[source]

Save data sonification to the given file. Currently the only output option is a wav file.

Parameters
filepathstr

The path to the output file.