CARMA C++
ProjectDatabaseManager.idl
Go to the documentation of this file.
1 #ifndef CARMA_OBSERVERTOOLS_PROJECTDATABASEMANAGER_IDL
2 #define CARMA_OBSERVERTOOLS_PROJECTDATABASEMANAGER_IDL
3 
16 
17 module carma {
18 module observertools {
19 
20  const string PROJECT_DATABASE_MANAGER_NAME =
21  "carma.projectDatabaseManager.projectDatabaseManagerControl";
22 
33  string errorMsg;
34  string filename;
35  short lineNo;
36  };
37 
41  typedef sequence<string> StringSequence;
42 
50  enum EditStatus {
58  };
59 
67  PSTATUS_OTHER
68  };
69 
73  enum ObsCategory {
89  };
90 
94  enum ObsType {
105  TYPE_NONE,
106  TYPE_PACS_DUALPOL,
107  TYPE_PACS_FULLPOL
108  };
109 
118  };
119 
123  typedef sequence<short> shortSequence;
124 
128  typedef sequence<double> doubleSequence;
129 
133  struct Source {
134  string sourceName;
135  boolean ephemeris;
136  double ra;
137  double dec;
138  string dataFile;
139  float velocity;
140  string veltype;
143  shortSequence correlatorSetup;
144  };
145 
149  typedef sequence<Source> SourceSequence;
150 
154  struct Calibrator {
155  string calibratorName;
156  string calType;
157  double ra;
158  double dec;
159  string dataFile;
160  float observationLength;
161  shortSequence correlatorSetup;
162  };
163 
167  typedef sequence<Calibrator> CalibratorSequence;
168 
172  struct Investigator {
173  string name;
174  string email;
175  string affiliation;
176  boolean isUsAffil;
177  };
178 
182  typedef sequence<Investigator> InvestigatorSequence;
183 
187  struct Window {
188  short windowNumber;
189  double bandwidth;
192  double minFrequency;
193  double maxFrequency;
194  };
195 
199  typedef sequence<Window> WindowSequence;
200 
204  struct Correlator {
205  short setupNumber;
207  WindowSequence window;
208  };
209 
213  typedef sequence<Correlator> CorrelatorSequence;
214 
218  struct Target {
219  string molecule;
220  string transition;
221  };
222 
226  typedef sequence<Target> TargetSequence;
227 
231  struct Trial {
232  string parentProject;
233  string parentObsblock;
235  string documentName;
236  short trialID;
240  string trialObservationDateEnd;
242  double observedLSTend;
243  boolean fastSwitch;
244  float averagePhase;
247  float obsGrade;
248  string obsComments;
250  doubleSequence offsets;
252  TargetSequence target;
253  SourceSequence source;
254  CalibratorSequence calibrator;
255  CorrelatorSequence correlator;
260  string imgVsSnr;
263  short maxTsys;
265  float maxOpacity;
269  // End of observing constraints
270  string script;
271  string catalog;
272  string systemScripts;
273  string scriptParameterization;
274  };
275 
279  typedef sequence<Trial> TrialSequence;
280 
284  struct SubObsblock {
285  string parentProject;
286  string parentObsblock;
287  string documentName;
288  string subObsblockID;
291  StringSequence parentSubObsblock;
292  StringSequence childSubObsblock;
293  short lastTrial;
294  TrialSequence trial;
295  };
296 
300  typedef sequence<SubObsblock> SubObsblockSequence;
301 
305  struct Obsblock {
306  string parentProject;
307  string documentName;
308  string obsblockID;
310  boolean exceedTAC;
313  float priority;
315  float totalObsTime;
319  double lowRa;
320  double highRa;
323  string receiverBand;
326  boolean isFlex;
327  StringSequence parentObsblock;
328  StringSequence childObsblock;
329  SubObsblockSequence subObsblock;
330  };
331 
335  typedef sequence<Obsblock> ObsblockSequence;
336 
340  struct Project {
341  string projectID;
343  string proposalTerm;
344  float totalTime;
345  string title;
348  InvestigatorSequence coInvestigator;
350  boolean isKeyProject;
351  boolean isFastTrack;
352  boolean isCommissioning;
355  StringSequence parentProject;
356  StringSequence childProject;
357  ObsblockSequence obsblock;
358  };
359 
363  typedef sequence<Project> ProjectSequence;
364 
369 
370  // Check the database for consistency.
371  void checkDatabase() raises(carma::util::UserException);
372 
373  // Query the database.
374  ProjectSequence projectQuery(in ItemValueSequence theQuery)
377 
378  // Query the database.
379  // Same as projectQuery(), but uses an out parameter to return the results
380  void projectQueryInOut(
381  in ItemValueSequence theQuery,
382  out ProjectSequence pSeq)
385 
386  // Find and return the observing script for a project. It is returned as a
387  // sequence of strings, one element for each line in the original script file.
388  // The observing script from the last trial is returned, previous trials are
389  // ignored.
390  //
391  // Various characters are replaced with escape sequences.
392  // See ProjectDatabaseManagerUtils.cc replaceForbidden() for the exact list.
393  StringSequence projectOscriptFind(
394  in string projectID,
395  in string obsblock,
396  in string subObsblock)
399 
400  // Add an observing script and source catalog to the database.
401  void projectOscriptAdd(
402  in string projectID,
403  in string obsblock,
404  in string subObsblock,
405  in string scriptFile,
406  in string catalogFile)
409 
410  // Edit items in a project.
411  boolean projectEdit(
412  in string projectID,
413  in string obsblock,
414  in string subObsblock,
415  in short trial,
416  in ItemValueSequence itemValueSeq,
417  in EditStatus action)
420 
421  // Edit items in a project.
422  // Same as projectEdit(), but uses an out parameter to return the status.
423  void projectEditInOut(
424  in string projectID,
425  in string obsblock,
426  in string subObsblock,
427  in short trial,
428  in ItemValueSequence itemValueSeq,
429  in EditStatus action,
430  out boolean success)
433 
434  // Add a project to the database, taking input from a file.
435  void projectAdd(in string fileName)
438 
439  // Add a project to the database, taking input from a string.
440  boolean projectAddAsString(in string xmlString)
443 
444  // Convert a numeric grade [0-100] into a letter grade.
445  // See ProjectDatabaseManagerUtils.cc.
446  string gradeToLetter(in float grade)
448 
449  // Convert a letter grade (A+, A, A-, etc.) into a numeric grade [0-100].
450  // See ProjectDatabaseManagerUtils.cc.
451  float letterToGrade(in string letter)
453 
454  // Run a trial of a project. This creates a new trial structure in the
455  // database. The return value is the trial number.
456  short runProject(
457  in string projectID,
458  in string obsblock,
459  in string subObsblock,
460  in boolean isCommissioning,
461  in boolean isDualCorr,
462  in string arrayConfig1,
463  in string arrayConfig2,
464  in string scriptFile,
465  in string catalogFile)
468 
469  // Run a trial of a project.
470  // Same as runProject(), but uses an out parameter to return the trial number.
471  void runProjectInOut(
472  in string projectID,
473  in string obsblock,
474  in string subObsblock,
475  in boolean isCommissioning,
476  in boolean isDualCorr,
477  in string arrayConfig1,
478  in string arrayConfig2,
479  in string scriptFile,
480  in string catalogFile,
481  out short trialNumber)
484 
485  // Returns true if and only if the project id is part of the
486  // hardcoded list of commissioning projects in the source code.
487  //
488  // See ProjectDatabaseManagerUtils.cc for the list.
489  boolean isCommissioning(in string pid)
492 
493  // Check if the database is alive and responding to commands.
494  // Returns the hardcoded value 4.
495  short isUp()
498  };
499 
500 }; // module carma::observertools
501 }; // module carma
502 
503 #endif // CARMA_OBSERVERTOOLS_PROJECTDATABASEMANAGER_IDL
504 
505 /* vim: set ts=4 sts=4 sw=4 noet: */
ObsLikelihood
Enum for observation likelihood.
sequence< Window > WindowSequence
Sequence of windows.
string arrayConfiguration
array configuration (A-E)
ProjectStatus status
has the trial been observed
ObsCategory category
category of observations
ProjectStatus status
project status
short setupNumber
number of the correlator setup
sequence< Obsblock > ObsblockSequence
Sequence of obsblocks.
WindowSequence window
data on the windows in the setup
InvestigatorSequence coInvestigator
sequence of CoI&#39;s
short numberOfPointings
number of mosaic pointings
sequence< Target > TargetSequence
Sequence of targets.
short minNumberOfAntennas
minimum number of antennas
float remainingTime
how much time is remaining (min - obs)
string trialObservationDateStart
date of observation
sequence< Correlator > CorrelatorSequence
Sequence of Correalator setups.
double bandwidth
bandwidth of window in MHz
float averageOpacity
average opacity from track
StringSequence parentSubObsblock
related parent projects
string actualHourAngleCoverage
actual hour angles observed
boolean exceedTAC
can/cannot exceed TAC allocation
boolean isTargetOfOpportunity
is this a target of opportunity?
float totalTime
total time project has been obs.
string obsComments
comments from observer
string molecule
name of molecule, continuum or polarization
The interface to the CARMA Project Database Manager.
Investigator primaryInvestigator
PI of project.
float observationLength
length of observation in hours
double frequencyResolution
channel resolution in MHz
string dataFile
name of miriad file containing the data
sequence< string > StringSequence
Sequence of strings.
string email
email of investigator (may be blank)
doubleSequence offsets
offsets of mosaic pointings
string script
the observing script
full polarization observations
string projectAbstract
project abstract
float priority
priority of observations
sequence< double > doubleSequence
Sequence of doubles.
boolean isKeyProject
is this a key project
sequence< Calibrator > CalibratorSequence
Sequence of calibrators.
sequence< Investigator > InvestigatorSequence
Sequence of investigators.
sequence< SubObsblock > SubObsblockSequence
Sequence of subobsblocks.
An exception for an error in the database Usage example:
Single polarization observations.
ProjectStatus status
obsblock status
string calType
type of calibrator (FBGPOR)
boolean ephemeris
does the source have an ephemeris
ObsType observationType
observation type
float subObsblockObservationTime
how long has this subObsblock been observed
double maxFrequency
highest frequency in window in GHz
EditStatus
Various enumeration constants.
boolean isFastTrack
is this fast track proj
float maxRmsPathLength
max rms pathlength
float reqLowHourAngleCoverage
requested hour angle coverage
Correlator Spectral Window Data.
ProjectStatus
Enum for project status.
string parentSubObsblock
parent subObsblock
short windowNumber
the window number
double lowRa
RA that corresponds to reqLowHourAngleCoverage.
Generic Carma variant of CORBA::UserException.
boolean isUsAffil
is the affiliation in the US
float trialObservationLength
total observation time of trial in hrs
sequence< Trial > TrialSequence
Sequence of trials.
ObsType
Enum for observation type.
string transition
transition of molecule (blank if continuum or polarization)
CorrelatorSequence correlator
listing of all correlator setups
short numberOfAntennas
largest number of antennas used
sequence< Project > ProjectSequence
Sequence of projects.
StringSequence parentObsblock
related parent projects
short numberOfInvestigators
number of investigators
short numberOfChannels
number of channels in window
StringSequence childProject
related child projects
boolean fastSwitch
was fast switching done
float maxGaincalRms
maximum gain cal rms
string affiliation
investigator affiliation (e.g.
SubObsblockSequence subObsblock
sequence of sub-obsblocks
StringSequence childSubObsblock
related child projects
StringSequence childObsblock
related child projects
short maxTsys
maximum systemp temperature
string proposalTerm
term for call for proposals
float obsGrade
overall grade from observer
float reqHiHourAngleCoverage
requested hour angle coverage
float maxDecorrelationRatio
maximum decorrelation ratio
string subObsblockID
name of the sub-obsblock
StringSequence parentProject
related parent projects
shortSequence correlatorSetup
number of the assocaited correlator setup
ItemValue definition.
boolean isFlex
is the scheduling flexible
ObsCategory
Enum for observation category.
Project/obsblock/trial still has observable time.
CORBA User Exception for carma::util.
sequence< ItemValue > ItemValueSequence
Sequence of an Item name and value pairs.
Definition: ItemValue.idl:26
SourceSequence source
lising of sources observed
boolean isCommissioning
is this a commissioning project
float averagePhase
average RMS phase from track
shortSequence correlatorSetup
number of the assocaited correlator setup
float maxGaincalTime
maximum time to spend on gain cal
float velocity
velocity of the source in km/s
double highRa
RA that corresponds to reqHighHourAngleCoverage.
string veltype
type of velocity for velocity
float totalObsTime
total time this obsblock has been obs.
TargetSequence target
listing of observed molecules
string parentObsblock
parent obsblock
string calibratorName
name of calibrator (i.e.
ObsLikelihood likelihood
Observation likelihood.
CalibratorSequence calibrator
listing of calibrators observed
sequence< short > shortSequence
Sequence of shorts.
string dataFile
name of the miriad data file
ObsblockSequence obsblock
sequence of obsblocks
sequence< Source > SourceSequence
Sequence of sources.
double observedLSTstart
lst range of observation
TrialSequence trial
sequence of trials in the sub-obsblock
boolean isSelfcalibratable
is the source self calabratable
string name
full name of investigator
short numberOfWindows
how many windows are in the correlator setup
dual polarization observations
string obsblockID
name of the obsblock
ProjectStatus status
status of the sub-obsblock
string imgVsSnr
The following are observing constraints set by the PI to aid in scheduling the observations.
maximum sinsitivity observations
float dqaOverallGrade
overall grade from DQA
float requiredSourceRms
required source rms
string catalog
the observing catalog
double minFrequency
lowest frequency in window in GHz