Changeset 18046 for trunk/FACT++
- Timestamp:
- 01/03/15 05:32:49 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/scripts/Observation_class.js
r17355 r18046 41 41 ret[i].ra = parseFloat(obs.ra); 42 42 ret[i].dec = parseFloat(obs.dec); 43 ret[i].zd = parseFloat(obs.zd); 44 ret[i].az = parseFloat(obs.az); 45 ret[i].lidclosed = obs.lidclosed; 46 ret[i].rstype = obs.rstype ? obs.rstype : "default"; 43 47 ret[i].sub = i; 44 48 ret[i].start = utc; … … 62 66 throw new Error("Observation must have either 'source' or 'task' " + 63 67 "if 'task' == 'data' it must have also have 'source' "); 68 if (ret[i].lidclosed == true) 69 throw new Error("Observation must not have 'lidclosed'== true " + 70 "if 'task' == 'data' "); 64 71 break; 65 72 … … 75 82 76 83 case 'RATESCAN': 77 if (ret[i].source == undefined && ( ret[i].ra == undefined || ret[i].dec == undefined))84 if (ret[i].source == undefined && (isNaN(ret[i].ra) || isNaN(ret[i].dec))) 78 85 throw new Error("Observation must have either 'source' or 'ra' & 'dec' " + 79 86 "if 'task' == 'ratescan'"); 87 if (ret[i].lidclosed == true) 88 throw new Error("Observation must not have 'lidclosed'== true " + 89 "if 'task' == 'ratescan' "); 90 break; 91 92 case 'RATESCAN2': 93 if ((ret[i].lidclosed != true) && ret[i].source == undefined && (isNaN(ret[i].ra) || isNaN(ret[i].dec))) 94 throw new Error("Observation must have either 'source' or 'ra' & 'dec' " + 95 "if 'task' == 'ratescan2' and lidclosed==false or not given"); 96 if (ret[i].lidclosed == true && (isNaN(ret[i].az) || isNaN(ret[i].az))) 97 throw new Error("Observation must have 'zd' & 'az' " + 98 "if 'task' == 'ratescan2' and option 'lidclosed'=='true'"); 80 99 break; 81 100
Note:
See TracChangeset
for help on using the changeset viewer.