I am new to programming (but not to the concepts) and I need to process some .csv files. Here's what I have:
The files containing Cartesian coordinates, XYZ of various "polygons." (They are cell perimeters of a mouse embryo) The polygons are in quotes because they are not closed, and I need Python to close them for me. So what I want to do is use Python to: (in general terms)
Go to cell 1
Find start point coordinate(s) It will always be "A."
Copy those values
Find endpoint coordinate(s) This will vary, and I need to set bounds here, as the drawing s/w sets the points down as A-Z then restarts from A again! But that's another script that I believe will be trivial to create. (I could easily write a Excel macro to handle that problem)
Copy those values
Sum the values and average (divide by two)
Paste those values as the new beginning and end points. Closes the polygon.
Go to cell 2 - repeat until end.
I figure I must process each cell three times. I first sum and average the value for X, then do it again for Y, then finally for Z. I'm also guessing I will need a sandbox to paste the new value (twice - once at start, once at end), and insert between the those points the other values, the ones for B through the unknown penultimate value.
So my questions are: Am I thinking this through right? And - are there any examples from which I could copy the methodology? It's much easier to follow directions or the path of someone else then it is to build from scratch.
I intend to pre-process the files and so can delete/ insert Carriage Returns or other things between the coordinates and cells to make my script easier to code. I'm working in Bitplane's Imaris software if you're familiar with the image source files. Thanks!