Difference between revisions of "STIX Flare Analysis Bot"

From stix
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== How to contribute code to the STIX flare analysis bot ==
 
== How to contribute code to the STIX flare analysis bot ==
Plugins can be inserted to the bot. They should look similar to the example below:
+
Plugins written in python are supported. They should look similar to the example below:
<nowiki>
+
<syntaxhighlight lang="python" line='line'>
<code>
 
 
from  matplotlib import pyplot as plt
 
from  matplotlib import pyplot as plt
 
def plot_goes_x_ray_flux(start_utc, end_utc):  
 
def plot_goes_x_ray_flux(start_utc, end_utc):  
Line 8: Line 7:
 
     plot the data
 
     plot the data
 
   '''  
 
   '''  
   plt.plot(xx)
+
   plt.plot(t,lc)
 
   filename='filename.svg'
 
   filename='filename.svg'
 
   plt.savefig(filename)
 
   plt.savefig(filename)
 
   return filename
 
   return filename
</code>
+
</nowiki>
+
</syntaxhighlight>

Latest revision as of 20:05, 11 May 2021

How to contribute code to the STIX flare analysis bot

Plugins written in python are supported. They should look similar to the example below:

1 from  matplotlib import pyplot as plt
2 def plot_goes_x_ray_flux(start_utc, end_utc): 
3    '''code to retrieve GOES light curve data
4     plot the data
5    ''' 
6    plt.plot(t,lc)
7    filename='filename.svg'
8    plt.savefig(filename)
9    return filename