- Mar 09, 2017
-
-
Sam Yates authored
Fix morphology section ctor bug. Add morphology pools for miniapp from which morphologies are drawn in the recipe. Add command-line options to expose above. Add option --report-compartments to (slowly) check the min, mean, and max number of compartments in the generated cells across the simulation. Use morphology::add_section to do all the heavy lifting; no need to make section_geometry objects by hand, unless you really, really want to.
-
Sam Yates authored
This PR is a prelude to closer integration of the random morphology generation with the miniapp, with the first step being support for recipes that create cells from morphologies generated off-line. It aims to use nest::mc::morphology as the flat morphology-only representation that can be used to construct nest::mc::cell objects and which can exist as a target for SWC conversion and random morphology generation. Simplify swc io implementation: Avoid throwing exceptions in istream parsing and swc_record constructors — only throw when explicitly checking consistency, or when parsing a full sequence of records. Allow direct access to record members. Separate parsing considerations from canonicalization (renumbering, sorting) of a sequence of records. Move lmorpho morphology classes into src/ Add invariant check procedure for morphology. Make cells via swc -> morphology -> cell building, rather than direct swc -> cell. Allow option to use ...
-
- Jul 03, 2016
-
-
Vasileios Karakasis authored
Whitespace-only lines are now treated correctly in SWC file parser. This automatically leads to a consistent and nice handling of old mac-style eol; they are just another whitespace (not newline). Refined the test cases a bit. Added support for mapping swc record types to nest::mc::segmentKind. This required the adjustment in some tests + the ball_and_stick file, since the dendrite type of swc record is type '3'. Before, everything except soma was added (hardcoded) as a dendrite. An swc_parse_error will be thrown in case of an impossible mapping. Also, no check is performed for inconsistencies of SWC record types along a branch; the type of the branch is assumed to be the type of the first record (compartment) in the branch. Finally, adapted to the coding style.
-
- Jul 01, 2016
-
-
Wouter Klijn authored
-
Wouter Klijn authored
-
Wouter Klijn authored
Issue 34 parse errors when opening a file created in windows. Solution is a method that reads the lines in a windows and linux save manner. Includes a unit/regression tests toggling between red and green after the fix is applied.
-
- Jun 09, 2016
-
-
Wouter Klijn authored
Use "" for local includes Use <> for includes from include directories
-
- Apr 22, 2016
-
-
Vasileios Karakasis authored
+ some other minor improvements.
-
- Apr 18, 2016
-
-
Vasileios Karakasis authored
+ converted swc_record::kind to an ``enum class``
-
- Apr 12, 2016
-
-
Benjamin Cumming authored
-
Vasileios Karakasis authored
Fixes issue #8.
-
- Mar 10, 2016
-
-
Vasileios Karakasis authored
+ some const specifiers.
-
Vasileios Karakasis authored
All tests are adjusted accordingly and swc_read_cells() is now removed.
-
Vasileios Karakasis authored
Notable difference: parse_record() now throws only an swc_parse_error. In case of an invalid_argument raised by the cell_record constructor, this is caught and rethrown as a swc_parse_error with line information attached.
-
- Mar 09, 2016
-
-
Vasileios Karakasis authored
Begin iterator resets the input stream. Adde `-g' flag in compilation to allow debugging.
-
Vasileios Karakasis authored
-
- Mar 08, 2016
-
-
Vasileios Karakasis authored
Use of cell record ranges for hiding the internals of file reading. This is a proof-of-concept for a first peer review and discussion. Check usage paradigm in corresponding test. Now we could easily support stateful parsing reporting context of problematic lines.
-
- Feb 03, 2016
-
-
Vasileios Karakasis authored
Moved SWC parser's and cell record's implementation details to a separate file. Also added braces around single-line control/loop blocks.
-
- Feb 02, 2016
-
-
Vasileios Karakasis authored
Read in cell records and do a basic cleaning: 1. Remove duplicates. Only the first occurance is considered. 2. Sort the records if not sorted. 3. Ignore subsequent trees if more than one are specified. 4. Renumber records if numbering is not contiguous.
-
- Jan 29, 2016
-
-
Vasileios Karakasis authored
This exception is thrown when a parse error occurs, instead of std::runtime_error and std::logical_error that used to be thrown before.
-
Vasileios Karakasis authored
The will be useful for sorting cell records. Equality and ordering is defined solely on records IDs.
-
Vasileios Karakasis authored
-
- Jan 26, 2016
-
-
Benjamin Cumming authored
-
- Jan 21, 2016
-
-
Vasileios Karakasis authored
-
Vasileios Karakasis authored
The line buffer is no more a pure character array but a standard string. For reading lines from the input stream we use the higher level std::getline() function which takes care of overflow issues. Side improvements: String comment prefixes are now supported. Other changes: added `-pedantic' to the compilation flags, to force strict C++11 compliance.
-
Vasileios Karakasis authored
-
Vasileios Karakasis authored
The parser's semantics are now cleaner and the implementation more robust. Cell parsing now follows the semantics of the standard input stream (same as of standard UNIX's read), but instead of reading in bytes or builtin types, we are reading full cell records. This has the following implications: 1. Empty and comment lines are consumed silently. 2. End-of-file will be set on the stream only if a read operation returns zero. Practically, this means, eof bit will be set in the stream at the first attempt to read a cell record after the final cell record in the stream was read. 3. Exceptional conditions in the stream (e.g., eof or bad bits) stop the parsing process without raising an exception and return control to the user which is responsible to deal with them. The only exceptional condition that we handle internally is the presence of very long lines, in which case we raise an std::runtime_error(). Thanks to these cleaner semantics, the parser is now able to deal with files not ending with a new line. The previous version would have missed the last record. Due to (2) the following code for reading from an input stream will yield an additional default constructed cell record at the end: while (!swc_input.eof()) { cell_record cell; swc_input >> cell; // do sth with the cell } According to (2), after the final record is read, eof is not yet set at the stream, which means the while loop will be entered one more time. The attempt to read a record from the stream then will raise the eof bit and no cell will be read in, leaving `cell' at its default constructed state. To avoid such a side-effect, the best way to read records from an input stream is the following: cell_record cell; while( !(swc_input >> cell).eof()) { // do sth with the cell } In this case, after the final record is read, the next attempt to read in a record will set the eof bit and won't enter the loop.
-
- Jan 20, 2016
-
-
Vasileios Karakasis authored
A very basic parser of SWC files. The role of the parser is to extract cell records from an SWC file line-by-line, which will then be used to construct the neuron cell models. The parser currently does only a simple linewise processing of the cell records. This practically means that the validity of the input is only checked at the cell record level. More advanced input processing, such as detection of duplicate cell ids, holes in cell id numbering or multiple cell trees in a file are not currently treated.
-