init_list = [] # initial values for chunks
median_list = [] # list of median values for 300 s intervals
holding_list = [] # hold values up till what you tell it to
pos_count = 0 # 0 = position 1 for python
for i in range(len(flux_maxij)):
holding_list.append(flux_maxij[i]) # append means add on to
if pos_count == 0: # '==' means IF it is this value
init_list.append(i)
if pos_count == 299: # 299 = 300 which is the 'end' of the range
holding_list.sort() #make it pretty
median_list.append(holding_list[149]) # half of 300 is 150, 149 for python
holding_list = []
pos_count = -1 # -1+1 = o, position 1 when it loops back
pos_count += 1
x = np.array([init_list]) # makes arrays for x and y to graph it
y = np.array([median_list])
plt.plot(x,y, 's')