from loadmatlab_workspace import load_mat
import copy
import numpy as np
from pickfirstf_python import pickfirstf
before= load_mat('nopinone-kit')
kit=before['kit']
fs_original = kit['onedpeakfsunassigned']
hs_original = kit['onedpeakhsunassigned']
fs= copy.copy(fs_original)
hs= copy.copy(hs_original)
fstart, hstart, istart, rank = pickfirstf(kit,1)

fs = fs[np.where(hs > 12.8685)] #within this treshold
hs = hs[np.where(hs > 12.8685)]
print("wow")


# database= before['database']
# fieldname = before['fieldname']
# # database=[]
# # dict1= {'a' :'k', 'netpval': 2, 'dog':'woof'}
# # dict2= {'a' :'c', 'netpval': 1, 'dog':'bork'}
# # dict3= {'a' :'b', 'netpval': 5, 'dog':'bark'}
# # database.append(dict1)
# # database.append(dict2)
# # database.append(dict3)
# output={}
# for i in fieldname:
#    output.update({i: []})
# # dog_sounds= []
# # letters=[]
Example #2
0
from evalf_python import evalf
from scipy import interpolate
from loadmatlab_workspace import load_mat
import numpy as np
from custommpl import customplot

from matplotlib.figure import Figure
from matplotlib.backends.backend_qt4agg import (FigureCanvasQTAgg as
                                                FigureCanvas,
                                                NavigationToolbar2QT as
                                                NavigationToolbar)

before = load_mat('input-saveAshape-plotting')
kit = before['kit']


def saveAshape(kit, verbose=1):
    # Omitting stuff about loading and saving files
    # if nargin < 1
    # load('ttfile','kit')
    # else
    # save('ttfile','kit')

    f0J = kit['series1']['fs']
    f1J = kit['series4']['fs']
    J = range(len(f1J))
    Jforf1 = kit['series4']['jvalues']
    Jforf0 = kit['series1']['jvalues']

    #commenting out call to otherwise unused function, also commented out below
    #exploreBC(Jforf0,f0J,kit.cheat.molstats);
Example #3
0
# import pytest
from loadmatlab_workspace import load_mat
before=load_mat("before-updateseries-nopinone-unsure")
s=before['s']
def comparinginput(python_in):
    return python_in

def test_answer():
    assert comparinginput(s)=s
Example #4
0
from pickfirstf_python import pickfirstf
from getflatsquares_python import getflatsquares
from seriessquarefromflatsquare_python import seriessquarefromflatsquare
from extendseriessquarealltheway_python_July9 import extendseriessquarealltheway
from extractfieldsfromcellarray_python import extractfieldsfromcellarray
from sortcellarraybyfield_python import sortcellarraybyfield
# from trimends_python import trimends
from loadmatlab_workspace import load_mat
from comparefileoutputs import unpackingstruct
# from removeidentical_python import removeidentical

before = load_mat('input-addsquaresfromlines-s')
kit = before['kit']
linetouse = before['linetouse']
import numpy as np


def squaresfromline(kit, linetouse):
    searchReport = {}

    ts = kit['tightnesssettings']
    # Ignoring timing stuff. Original line: ts.starttime = now;
    searchReport['bogged'] = 0
    searchReport['numflatsquares'] = 0

    finalsquares = []
    (allsquares, kit,
     f1) = getflatsquares(kit, linetouse,
                          ts)  #adding in f1 to solve the value error
    fs = kit['usefs']
    hs = kit['usehs']
Example #5
0
from copy import *
#import operator as op
from predictnext_python import predictnext
from countfrommcounttool_python import countfrommcounttool
from loadmatlab_workspace import load_mat

# from flipmatrix_python_temp import flipmatrix
# from flipseriessquare_python_temp import flipseriessquare
# from addlinetolevels_python_temp import addlinetolevels
# from checkhealth_python_temp import checkhealth
# from addlevels_python_temp import addlevels
# from hashfromsquare_python_temp import hashfromsquare
# from usablefgrid_python_temp import usablefgrid
# updateseriessquare.m

before = load_mat('before-updateseriessquare-nopinone')
s = before['s']


def updateseriessquare(s, slowmode=1):

    s['column1'] = updateseries(s['column1'])
    s['column2'] = updateseries(s['column2'])
    s['column3'] = updateseries(s['column3'])
    s['column4'] = updateseries(s['column4'])
    s['numjs'] = np.size(s['column1']['fs'], axis=None)

    s['fgrid'] = np.zeros((s['numjs'], 4))

    # if s['dtype == 1
    s['fgrid'][:, 0] = s['column1']['fs']
Example #6
0
import numpy as np
#from np.size_py import np.size, findnonzeros
from sortcellarraybyfield_python import sortcellarraybyfield
from extractfieldsfromcellarray_python import extractfieldsfromcellarray
from updateseries_python import updateseries
from predictnext_python import predictnext
from countfrommcounttool_python import countfrommcounttool
from loadmatlab_workspace import load_mat
from updateseriessquare_python_temp import updateseriessquare
# extendseriessquarealltheway.m
from loadmatlab_workspace import load_mat
from copy import *
from datetime import datetime
    
before= load_mat('input-extendseriessquarealltheway-nopinone')
fs= before['fs']
hs= before['hs']
squarelist= before['squarelist']
# ###look at this arianna, it ran without error but u still need to look over the output
# middle=load_mat('inthemiddle-extendseriesalltheway-squarelist')
# squarelist_m=middle['squarelist']
# newlist_m=middle['newlist']
# before_m=load_mat('squarelist-beforesorting-essatw')
squarelist_beforesortm= load_mat('squarelist-beforesorting-essatw')['newlist']
# after_m= load_mat('squarelist-aftersorting-essatw')
squarelist_aftersortm= load_mat('squarelist-aftersorting-essatw')['squarelist']
def extendseriessquarealltheway(squarelist,fs,hs):


    census= np.zeros(20)
Example #7
0
from updateseriessquare_python_temp import updateseriessquare
# extendseriessquarealltheway.m
from loadmatlab_workspace import load_mat
from copy import *

# before= load_mat('input-extendseriessquarealltheway-nopinone')
# fs= before['fs']
# hs= before['hs']
# squarelist= before['squarelist']
###look at this arianna, it ran without error but u still need to look over the output
# middle=load_mat('inthemiddle-extendseriesalltheway-squarelist')
# squarelist_m=middle['squarelist']
# newlist_m=middle['newlist']

#testing loadinng individual variables
fs = load_mat('input-essaw-fs')['fs']
hs = load_mat('input-essaw-hs')['hs']
squarelist = load_mat('input-essaw-squarelist')['squarelist']


def extendseriessquarealltheway(squarelist, fs, hs):

    census = np.zeros(20)
    # extendseriessquarealltheway.m:4
    boggeddown = 0
    # extendseriessquarealltheway.m:5
    newsquarelist = copy(squarelist)
    # extendseriessquarealltheway.m:6
    if np.size(squarelist) == 0:
        return newsquarelist, boggeddown, census