Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Appendix

File Variables 

These are special, read-only keywords maintained by the trajectory engine, which can be used to construct file expressions. 

fileNum 

  • represents a counter; every time a point is about to count, it checks if a new fileGroup is available and increments fileNum.
  • While the trajectory is running, if a fileGroup never changes, then the counter only increments once.
  • It resets back to zero for every new experiment. 

instFileNum 

  • the same as fileNum, except that it does not reset for every new experiment.
  • In practice this should increment forever. 

pointNum 

  • starts at zero for each new trajectory and increments once per point. 

expPointNum 

  • starts at zero for each new experiment and increments once per point.
  • Switching to an old experiment will not reset expPointNum

File Expressions 

fileName 

  • is the final value used by writers to construct file names.  
  • Default: "String(filePrefix) + String(fileNum)" 
  • If overwritten, this can cause name collisions when the same trajectory runs again. 
  • Can be specified per instrument to be displayed in the editor.  

filePrefix 

  • can be specified instead of fileName to guarantee uniqueness of the data files. 
  • Default: filePrefix = trajName 
  • Can be specified per instrument to be displayed in the editor.  

trajName 

  • specifies the trajectory file base name.
  • The value is not explicitly exposed in the editor and should generally not be overwritten. 

description 

  • metadata that describes trajectory.
  • Is empty by default.

entryName 

  • defines the format for entries for NEXUS data files, by default is set to "" (an empty string).
  • can be specified per instrument to be displayed in the editor.  
  • Default: empty string

fileGroup 

  • defines a trigger for incrementing fileNum.
    • A list of evaluated fileGroups will be maintained per trajectory and reset every time a new one starts.
    • By default, fileGroup is empty and does not change; therefore, fileNum increments only once per trajectory. 
  • SANS instruments can take advantage of this feature.
    • In a typical trajectory, every point needs to write to a new data file. It can be accomplished by making fileGroup change at every point: fileGroup = pointNum.
  • Can be specified per instrument to be displayed in the editor.  
  • Default: empty string 

Default File Rules 

The following default file rules are used if not explicitly defined in a trajectory: 

fileName = filePrefix + fileNum 

filePrefix = trajNam

entryName = empty string 

fileGroup = empty string 

Whenever a new trajectory is created through the NICE editor, file rule expressions are explicitly set to default values as determined by the instrument scientist. However, it is still possible for these file rules to be undefined given that: 

  • Older trajectories may not have defined these expressions explicitly. 
  • A user may delete these expressions in the editor.
  • A user may create a trajectory outside the NICE editor.
Created March 20, 2020