Skip to content

Commit

Permalink
updates for code styling, marking style check to continue on error
Browse files Browse the repository at this point in the history
  • Loading branch information
scfleming committed Jan 15, 2025
1 parent de4b53a commit 1569966
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ jobs:
include:

- name: Code style checks
continue-on-error: true
os: ubuntu-latest
python: 3.x
toxenv: codestyle
Expand Down
10 changes: 3 additions & 7 deletions astronify/series/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ def pitch_map_args(self, new_args):

class SoniSeries():

def __init__(self, data, time_col="time", val_col="flux",
preview_type="scan"):
def __init__(self, data, time_col="time", val_col="flux", preview_type="scan"):
"""
Class that encapsulates a sonified data series.
Expand Down Expand Up @@ -321,8 +320,7 @@ def write(self, filepath):

class SeriesPreviews():
"""
Previews (or snapshots) of 1d spectra by binning the data into
five equal pieces by assigning a sound to each piece.
Previews (or snapshots) of 1d spectra by binning the data into five equal pieces by assigning a sound to each piece.
"""

def __init__(self, soniseries):
Expand Down Expand Up @@ -359,10 +357,8 @@ def area_of_pieces(self, ydata_bins, xdata_bins):
return area_vals

def plot_preview(self, xdata_bin_ranges):

plt.plot(self._soniseries.data[self._soniseries.time_col],
self._soniseries.data[self._soniseries.val_col],
color='k')
self._soniseries.data[self._soniseries.val_col], color='k')

plt.axvspan(xdata_bin_ranges[0][0], xdata_bin_ranges[0][1], color='royalblue', alpha=0.5, lw=0)
plt.axvspan(xdata_bin_ranges[1][0], xdata_bin_ranges[1][1], color='green', alpha=0.5, lw=0)
Expand Down

0 comments on commit 1569966

Please sign in to comment.