« first day (2149 days earlier)      last day (1229 days later) » 

7:55 PM
import pandas as pd

dataframe = pd.read_csv('separated.csv', header=None)

print(dataframe)
print(' ')

array = []

for line in dataframe.iterrows():

print(line[1][0])

record = line[1][0]

array.append(record)

print(' ')

print(array)
print(' ')

array = array

groupby_by = 2

subList = [theList[n:n+N] for n in range(0, len(array), groupby_by)]

print(subList)

new_array = []

for element in subList:
print(str(element).replace("'", ' ').replace(' , ', ''))

new_element = str(element).replace("'", ' ').replace(' , ', '')
My apologies for the tidiness.
Before I go- I saw an error in the last code.
@author: Shivek
"""

import pandas as pd

dataframe = pd.read_csv('separated.csv', header=None)

print(dataframe)
print(' ')

array = []

for line in dataframe.iterrows():

print(line[1][0])

record = line[1][0]

array.append(record)

print(' ')

print(array)
print(' ')

array = array

groupby_by = 2

subList = [array[n:n+groupby_by] for n in range(0, len(array), groupby_by)]

print(subList)

new_array = []

for element in subList:
print(str(element).replace("'", ' ').replace(' , ', ''))

new_element = str(element).replace("'", ' ').replace(' , ', '')
 
8:23 PM
4 messages moved from Python
 
8:44 PM
@AndrasDeak see it.

arrays = np.empty((1024,40,40))
i = 0
with open('matrixfile.csv') as f:
contents = f.read()
blocks = contents.strip().split('\n\n')
for block in blocks:
fake_file = StringIO(block)
arrays[i] = np.loadtxt(fake_file)
i = i + 1
For 1024 2D arrays of shape 40x40
 
1 message moved from Python
 
 
3 hours later…
11:44 PM
data = currentData - bkgData
tileY =12
tileX =12
h,w = data.shape

DETECTED = np.zeros(data.shape).astype(np.float32)
for curY in range(tileY//2, h-tileY//2,tileY//2):
for curX in range(tileX//2, w-tileX//2,tileX//2):
# Get one of the patches of data
S = data[curY-tileY//2:curY+tileY//2,curX-tileX//2:curX+tileX//2]
# comput stdev, median
rms_bot_75 = rms(np.sort(S,axis=None)[:int((tileX*tileY)*.75)])
std_dev = np.std(S)
if std_dev != 0:
# IF SIGMA NOT ZERO
S = (S-rms_bot_75)/std_dev
# Done with processing this patch so update our output image
 
1 message moved from Python
 

« first day (2149 days earlier)      last day (1229 days later) »