# load the library import pytsa as tsa # import a dataset and name the columns mydata = tsa.dataset('.', colnames=['time', 'Preys', 'Predators'], ext='.data') # mydata.deloutput('view') # mydata.addoutput('png') # plot data , as it is mydata.splot(columns=['Preys', 'Predators'], stop=1000) mydata.phspace(['Preys', 'Predators'], stop=500) mydata.phspace3d(['Preys', 'Predators', 'Preys'], stop=500) # plot the species probabilities at t =100 mydata.aplot(stop=100) mydata.asdplot(stop=100, merge=True, legend=True) mydata.aphspace(['Preys', 'Predators'], stop=500) mydata.aphspace3d(['Preys', 'Predators', 'Preys'], stop=500) mydata.pdf(100, columns=['Preys', 'Predators'], normed=True, fit=True) mydata.pdf3d('Preys', moments=[10, 20, 30]) # estimate the master equatio in [0 ,100] as a 2 D heatmap mydata.meq2d(start=0, stop=100) mydata.meq3d('Preys', start=0, stop=100)
FOLDER = './bio_tmp/' # Define the time instants at which you want to evaluate the probability density function PDFTIMES = [5, 10, 25, 50, 75, 100] # Define the time instants at which you want to evaluate the probability density function MEQTIME_FROM = 0 MEQTIME_TO = 100 COLID = range(9) COLNAMES = ['t', 'A', 'B', 'C', 'D', 'E', 'F', 'X', 'Y'] NAMES = ['A', 'B', 'C', 'D', 'E', 'F', 'X', 'Y'] #NAMES = ['X1', 'X2', 'X3', 'X4', 'X5', 'X6', 'X7', 'X8'] ####### Load the dataset t = tsa.dataset(FOLDER, commentstring='#', colid=COLID, colnames=COLNAMES) ####### Set up the output terminal t.deloutput('view') t.addoutput('eps') t.addoutput('png') t.addoutput('txt') ####### Plot all the time-series, divided by columns, and plot each column in a different panel #print('splot: plot all the time-series, divided by columns, and plot each column in a different panel.') #t.splot() ####### Plot the average and standard deviation (bar plot) of all the time-series, divided by columns, and plot each column in a different panel print( 'msdplot: Plot the average and standard deviation (bar plot) of all the time-series, divided by columns, and plot each column in a different panel' )
FOLDER = './bio_tmp/' # Define the time instants at which you want to evaluate the probability density function PDFTIMES = [5, 10, 25, 50, 75, 100] # Define the time instants at which you want to evaluate the probability density function MEQTIME_FROM = 0 MEQTIME_TO = 100 COLID = range(9) COLNAMES = ['t', 'A', 'B', 'C', 'D', 'E', 'F', 'X', 'Y'] NAMES = ['A', 'B', 'C', 'D', 'E', 'F', 'X', 'Y'] #NAMES = ['X1', 'X2', 'X3', 'X4', 'X5', 'X6', 'X7', 'X8'] ####### Load the dataset t = tsa.dataset(FOLDER, commentstring='#', colid=COLID, colnames=COLNAMES) ####### Set up the output terminal t.deloutput('view') t.addoutput('eps') t.addoutput('png') t.addoutput('txt') ####### Plot all the time-series, divided by columns, and plot each column in a different panel #print('splot: plot all the time-series, divided by columns, and plot each column in a different panel.') #t.splot() ####### Plot the average and standard deviation (bar plot) of all the time-series, divided by columns, and plot each column in a different panel print('msdplot: Plot the average and standard deviation (bar plot) of all the time-series, divided by columns, and plot each column in a different panel') t.msdplot(columns=NAMES, errorbar=True)
# load the library import pytsa as tsa # import a dataset and name the columns mydata = tsa.dataset( '.' , colnames =[ 'time' , 'Preys' , 'Predators' ], ext='.data') # mydata.deloutput('view') # mydata.addoutput('png') # plot data , as it is mydata.splot( columns =[ 'Preys' , 'Predators'] , stop =1000) mydata.phspace([ 'Preys' , 'Predators'], stop = 500) mydata.phspace3d([ 'Preys' , 'Predators', 'Preys'], stop = 500) # plot the species probabilities at t =100 mydata.aplot(stop=100) mydata.asdplot(stop=100, merge=True, legend=True) mydata.aphspace([ 'Preys' , 'Predators'], stop = 500) mydata.aphspace3d([ 'Preys' , 'Predators', 'Preys'], stop = 500) mydata.pdf(100 , columns =[ 'Preys' , 'Predators'] , normed = True , fit = True ) mydata.pdf3d('Preys', moments=[10, 20, 30]) # estimate the master equatio in [0 ,100] as a 2 D heatmap mydata.meq2d( start =0 , stop =100) mydata.meq3d('Preys', start=0, stop=100)