Difference between revisions of "Model"

From Dynamo
Jump to navigation Jump to search
(Created page with "Category:Models Category:Particle picking The model is the standard way to create and store annotations in a tomogram. The most usual application of a model is in P...")
 
Line 4: Line 4:
 
The model is the standard way to create and store annotations in a tomogram. The most usual application of a model is in [[Particle picking|particle picking]] and [[Particle extraction|extraction]].
 
The model is the standard way to create and store annotations in a tomogram. The most usual application of a model is in [[Particle picking|particle picking]] and [[Particle extraction|extraction]].
  
A model has two basic functionalities:
+
A model has three basic functionalities, applied sequentially:
# Controls user input
+
# Data input  
#:An appropriate  model provides the user with tools to inspect the tomograms, locate manually or semi-automatically regions, structures or coordinates of interest and mark them.
+
#:Controls how the user feeds data into the model. An appropriate  model provides the user with tools to inspect the tomograms, locate manually or semi-automatically regions, structures or coordinates of interest and mark them.
# Converts the user input into particle positions
+
# Geometrical computation stage.
#:
+
#: Converts the input into particle positions.
 
# Archiving the annotations.
 
# Archiving the annotations.
 
#: Models are naturally integrated inside the [[catalogue]] system, making the process of extracting particles very easy.
 
#: Models are naturally integrated inside the [[catalogue]] system, making the process of extracting particles very easy.
  
For the first two functionalities, ''Dynamo''offers different types of models, adapted to the different geometries that you might encounter: filamentes, vesicles, irregularly shaped membranes, isolated particles, pseudo-crystaline arrangements....
+
For the first two functionalities, ''Dynamo''offers different types of models, adapted to the different geometries that you might encounter: filaments, vesicles, irregularly shaped membranes, isolated particles, pseudo-crystaline arrangements....
 +
 
 +
==Working with models==
 +
 
 +
===Input stage===
 +
 
 +
This part represents the interaction with the tomogram. Depending on the model, it might imply directly clicking particles, or clicking centers of vesicles, points on a membrane.
 +
 
 +
In most models, this stage produces a matrix of points in the field {{t|points}} of the model.
 +
 +
 
 +
===Computation stage===
 +
Once the initial points that describe the geometry of interest have been introduces, the user can choose for different parameters that will determine the actual location of the parameters. For instance, for vesicles, the user can choose the separation of particles for an even distribution on the vesicle surface, for filaments the user can chose the distance along the axis between successive cropping points. This process ranges between the trivial (isolated particles without preassigned orientation) to more complex construction (particles evenly distributed on arbitrarily shaped membranes)
 +
 
 +
At the end of this stage, all models will contain (non empty) fields {{t|crop_points}} and {{t|crop_angles}}. ''Dynamo'' will use them internally if you crop particles with the catalogue (useful when several models and tomograms are present), or you can extract a single cropping table corresponding to this particular model 
 +
 
 +
{{t|>> t = myModel.grepTable()}} 
  
 
==Basic operations with models==
 
==Basic operations with models==
 +
 +
T.B.I.
 +
 +
===Model files and model objects===
 +
A ''model file'' is simply a file containing a model. A ''model object'' is a model as seen in a current Matlab or [[Dynamo Standalone|''Dynamo Standalone'']] session.
 +
 +
''Programers''
 +
A model object has always a  superclass of type {{t|model}}, and the class will depend on the particular geometry.
  
 
==Types of models==
 
==Types of models==
  
 
===Isolated particles===
 
===Isolated particles===
 +
 +
In those modes, the Geometry computation stage
  
 
===Filaments===
 
===Filaments===
 +
{{main|Filament modesl|Vesicle model}}
 +
Adequate for particles evenly distributed along filaments. Subomograms can be defined to include full sections of the filament (with an initial orientation coaxial with the filament) or to be defined as centered in the building subunits and with an initial direction orthogonal to the axis.
 +
Filament models can also be used as support geometry for particles the decorate the filaments irregularly.
 +
  
 
===Membranes===
 
===Membranes===
 +
{{main|Membrane models|Vesicle model}}
 +
When particles are regularly distributed on a membrane (or a membrane fraction)  that cannot be approximated by a vesicle.
  
 
===Vesicles===
 
===Vesicles===
 +
{{main|Vesicle models|Vesicle model}}
 +
Adequate for particles evenly distributed on spheres or ellipsoids.
  
 
==Archiving models==
 
==Archiving models==
Line 31: Line 65:
  
 
==Importing models==
 
==Importing models==
 +
Coordinates and angles can be defined in other programs and imported into ''Dynamo'' as models. When an external file is imported as a model, ''Dynamo'' will fill the {{t|points}} fields of the models (and possibly other geometric parameters depending on the model type), covering the ''Point input stage'' of the model. The ''geometry computation''  stage can then be performed inside ''Dynamo''.
 +
 +
{{docfunction|dynamo_model_import|dmimport}}
  
 
==Command line options==
 
==Command line options==
Line 50: Line 87:
  
 
===Plotting models ===
 
===Plotting models ===
 +
An easy way to visualize the contents of a model object is with the {{t|ezplot}} method. Type symply:
 +
{{t|>> myModel.ezplot}}
 +
to get a menu of plotting options.

Revision as of 14:41, 21 April 2016


The model is the standard way to create and store annotations in a tomogram. The most usual application of a model is in particle picking and extraction.

A model has three basic functionalities, applied sequentially:

  1. Data input
    Controls how the user feeds data into the model. An appropriate model provides the user with tools to inspect the tomograms, locate manually or semi-automatically regions, structures or coordinates of interest and mark them.
  2. Geometrical computation stage.
    Converts the input into particle positions.
  3. Archiving the annotations.
    Models are naturally integrated inside the catalogue system, making the process of extracting particles very easy.

For the first two functionalities, Dynamooffers different types of models, adapted to the different geometries that you might encounter: filaments, vesicles, irregularly shaped membranes, isolated particles, pseudo-crystaline arrangements....

Working with models

Input stage

This part represents the interaction with the tomogram. Depending on the model, it might imply directly clicking particles, or clicking centers of vesicles, points on a membrane.

In most models, this stage produces a matrix of points in the field points of the model.


Computation stage

Once the initial points that describe the geometry of interest have been introduces, the user can choose for different parameters that will determine the actual location of the parameters. For instance, for vesicles, the user can choose the separation of particles for an even distribution on the vesicle surface, for filaments the user can chose the distance along the axis between successive cropping points. This process ranges between the trivial (isolated particles without preassigned orientation) to more complex construction (particles evenly distributed on arbitrarily shaped membranes)

At the end of this stage, all models will contain (non empty) fields crop_points and crop_angles. Dynamo will use them internally if you crop particles with the catalogue (useful when several models and tomograms are present), or you can extract a single cropping table corresponding to this particular model

{{{1}}}

Basic operations with models

T.B.I.

Model files and model objects

A model file is simply a file containing a model. A model object is a model as seen in a current Matlab or Dynamo Standalone session.

Programers A model object has always a superclass of type model, and the class will depend on the particular geometry.

Types of models

Isolated particles

In those modes, the Geometry computation stage

Filaments

Main article: Vesicle model

Adequate for particles evenly distributed along filaments. Subomograms can be defined to include full sections of the filament (with an initial orientation coaxial with the filament) or to be defined as centered in the building subunits and with an initial direction orthogonal to the axis. Filament models can also be used as support geometry for particles the decorate the filaments irregularly.


Membranes

Main article: Vesicle model

When particles are regularly distributed on a membrane (or a membrane fraction) that cannot be approximated by a vesicle.

Vesicles

Main article: Vesicle model

Adequate for particles evenly distributed on spheres or ellipsoids.

Archiving models

After creating or working with a model, it is important to remember to save it into disk. This will save the model in an appropriate place of the catalogue folder, and also create some internal links inside the catalogue.


Importing models

Coordinates and angles can be defined in other programs and imported into Dynamo as models. When an external file is imported as a model, Dynamo will fill the points fields of the models (and possibly other geometric parameters depending on the model type), covering the Point input stage of the model. The geometry computation stage can then be performed inside Dynamo.

dmimport

Command line options

Models can read an write normally using dread and dwrite. Basic models use the extension ".omd" (object model).

Adding a model to a catalogued tomogram

A file representing a model created on a catalogued tomogram will lay in a predefined position. For instance, a model named someModel created by Dynamo in one of its catalogue-based tomogram viewers for the volume indexed as 2 in a catalogue named my Catalogue will be automatically stored in the position: myCatalogue /volume_2/models/someModel.omd

Now, if you have produced a model object myModel independently of the catalogue system, and want to embed it and assign it to a catalogued tomogram, you might have the temptation of just saving it as dwrite(myModel,'myCatalogue /volume_2/models/myModel.omd'). This is not correct, as the catalogue needs to preserve some internal links

  1. Assign the model with a Dynamo command
    dcm -c myCatalogue -l 2 -am myModel.omd
  2. Alternatively, you can tell the catalogue to relink all the files found in the models folder of one or more volumes.
    dcm -c myCatalogue --relinkAllModelFiles

If you have created a model

Plotting models

An easy way to visualize the contents of a model object is with the ezplot method. Type symply: >> myModel.ezplot to get a menu of plotting options.