Skip to content

Commit

Permalink
Return float32 values from velocity() function
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyPechnikov committed Jun 10, 2024
1 parent 0e8aecd commit 1479077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygmtsar/pygmtsar/Stack_stl.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def velocity(self, data):
#velocity = nanoseconds*data.polyfit('date', 1).polyfit_coefficients.sel(degree=1)/years
nanoseconds_per_year = 365.25*24*60*60*1e9
# calculate slope per year
velocity = nanoseconds_per_year*data.polyfit('date', 1).polyfit_coefficients.sel(degree=1).rename('trend')
velocity = nanoseconds_per_year*data.polyfit('date', 1).polyfit_coefficients.sel(degree=1).astype(np.float32).rename('trend')
return velocity

def trend(self, data, deg=1):
Expand Down

0 comments on commit 1479077

Please sign in to comment.