Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how different entities are to be referenced #16

Closed
sanjayankur31 opened this issue Feb 3, 2021 · 4 comments
Closed

Document how different entities are to be referenced #16

sanjayankur31 opened this issue Feb 3, 2021 · 4 comments
Assignees
Labels
C: content Improvements or additions to documentation T: enhancement Type: enhancement

Comments

@sanjayankur31
Copy link
Member

Most are to be referred in the /../.../... form following the document hierarchy. Some components where a size is provided are to be referenced using the [..] index notation. It'll be good to document this somewhere so it is clear to users.

@sanjayankur31 sanjayankur31 added C: content Improvements or additions to documentation T: enhancement Type: enhancement labels Feb 3, 2021
@sanjayankur31 sanjayankur31 self-assigned this Feb 3, 2021
@sanjayankur31
Copy link
Member Author

I'm not sure if this is consistent. When using NEURON, one must use the /../ form, it does not accept the `[ ]/' form at all.

This works:

    simulation.add_column_to_output_file("output0",
                                         column_id="pop0_0_v_Seg1_dend_1",
                                         quantity="pop0/0/olm/7/v")

but this does not:

    simulation.add_column_to_output_file("output0",
                                         column_id="pop0_0_v_Seg1_dend_1",
                                         quantity="pop0[0]/olm/7/v")

It results in a NEURON writer error, so either there's a bug in the writer class, or there's another reason why this doesn't work:

Exception in thread "main" java.lang.NullPointerException
        at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getExposure(LEMSQuantityPathNeuron.java:91)
        at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getExposure(LEMSQuantityPathNeuron.java:117)
        at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getDimension(LEMSQuantityPathNeuron.java:151)
        at org.neuroml.export.neuron.NeuronWriter.getMainScript(NeuronWriter.java:1400)
        at org.neuroml.export.neuron.NeuronWriter.generateMainScriptAndMods(NeuronWriter.java:277)
        at org.neuroml.export.neuron.NeuronWriter.generateAndRun(NeuronWriter.java:155)
        at org.neuroml.JNeuroML.main(JNeuroML.java:517)

I'm also unclear why one has to mention the name of the cell component (olm) in this case here.

@sanjayankur31
Copy link
Member Author

Using [0] works fine in the izhikevich example, even with NEURON, so it looks like it works for cells that do not have multiple compartments. Again, not sure if this is a LEMS thing or an export bug.

@sanjayankur31
Copy link
Member Author

@pgleeson, using indexing without the cell name does not work. So here's what I have so far. Noting this here so I can remove it from the example in the docs.

    simulation.add_column_to_output_file("output0",
                                         column_id="pop0_0_v_Seg1_dend_1",
                                         quantity="pop0/0/olm/7/v")
    # TODO: why does the name of the cell component have to be included? This
    # does not work, for example.
    """
    simulation.add_column_to_output_file("output0",
                                         column_id="pop0_0_v_Seg1_dend_1",
                                         quantity="pop0/0/7/v")
    """
    # TODO: why does indexing not work in this population?
    """
    simulation.add_column_to_output_file("output0",
                                         column_id="pop0_0_v_Seg1_dend_1",
                                         quantity="pop0[0]/olm/7/v")


    """
    # TODO: this does not work
    """
    simulation.add_column_to_output_file("output0",
                                         column_id="pop0_0_v_Seg1_dend_1",
                                         quantity="pop0[0]/7/v")
    """

All the cases that do not work give errors of this form:

Exception in thread "main" java.lang.NullPointerException
        at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getExposure(LEMSQuantityPathNeuron.java:91)
        at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getExposure(LEMSQuantityPathNeuron.java:117)
        at org.neuroml.export.neuron.LEMSQuantityPathNeuron.getDimension(LEMSQuantityPathNeuron.java:151)
        at org.neuroml.export.neuron.NeuronWriter.getMainScript(NeuronWriter.java:1400)
        at org.neuroml.export.neuron.NeuronWriter.generateMainScriptAndMods(NeuronWriter.java:277)
        at org.neuroml.export.neuron.NeuronWriter.generateAndRun(NeuronWriter.java:155)
        at org.neuroml.JNeuroML.main(JNeuroML.java:517)

@sanjayankur31
Copy link
Member Author

Duplicate of #15

@sanjayankur31 sanjayankur31 marked this as a duplicate of #15 Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: content Improvements or additions to documentation T: enhancement Type: enhancement
Projects
None yet
Development

No branches or pull requests

1 participant