Fix to deprecation bugs - #1
Open
Jasplet wants to merge 115 commits into
Open
Conversation
…MMENDED FOR DATAFRAMES, replacing with lists which will be turned into a dataframe only when needed as per pandas /stackoverflow reccomendsations
…s'. it is only used to add a column which can be done more effeciently (line wise and computationally) by df['sum_pows'] = sum_pows
… on filt_events_df rather than overwritign it with a view of itself
…, for some reason making a dict first itsn working here?
… _phase_associator
under-the hood functins to iprove readability
may want to re-do dir structure at some point too
Longerterm fix would be to write these as hour time series most probably
…streams this then triggers self.n_win to evalute to -20 which raises a negative dimension error. this is occuring because Stream objects are being trimmed incorrectly at the END of a query testing for starttime >= query and endtime <= query patches this more testign needed to ensure this is working as intended
Added comment on why this fork exists
Using starttime_this_st results in the INCORRECT times being in some cases If the loaded data is trimmed so that it does not start on the hour. Then starttime_this_st is not at the hour either. This breaks for queries longer than 1 minute. My fix is instead to assign time from the minute trimmed chunks of data. For queries longer than a minute this means the minute bemform time series are given the correct times. For queries < 60 s the trimmed data starts at query start, so times should be correctly assigned from that reference point.
moved run_array_proc to appear before
Bugfix joseph
this reduces the number of nested for loops which can only be a good thing :-)
finished jday -> mmdd retool
and fix bug in printing of times, i wasnt adding the right hour!
streams where starttime == endtime were possible, and now shouldn't be. also moved deletion of power spectra and garbage collection to be within the minute for loop as there doesn't appear to be a reason why we wouldnt do this
reomvoe for loops in _phase_associatior for gettign t in seconds after start
…by bazi differnece and phase seperation (close P and S preferred)
Mad detector debugging
Revert as adding extra power/bazi columns is not super useful and adds confusion to reading outputs This reverts commit 2a4b257.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As we discussed when looking at the code earlier, there are a few deprecation issues. I also plan to put together an updated list of requirements -but this wont happen until monday at least. I have made this pull request now to try and keep this fork in sync before you make any changes. Obviously there are no tests to run, but I can now reproduce the icequake example fully.
Fixed deprecation bugs to allow for compatability with numpy >= 1.20 by replacing 'np.int' with 'np.int64'
Made compatible with pandas >= 2.0 by removing uses of pd.append. this behaviour is heavily discouraged by pandas devs as appending a dataframe does not happen "in place" lsit it does for lists and instead creates a new datafram which is significantly more expensive. This stackoverflow thread gives a nice exapliner https://stackoverflow.com/questions/75956209/dataframe-object-has-no-attribute-append
I have tried where possible to minimise the concateneting of arrays, whilst still preserving the current strcutre of the code.