source: trunk/Mars/fact/processing/dust.C@ 18522

Last change on this file since 18522 was 18521, checked in by tbretz, 9 years ago
New macro to extract dust from files.
File size: 544 bytes
Line 
1void dust(const char *fname, double beg=0, double end=100000)
2{
3 fits file(fname);
4
5 //file.PrintColumns();
6 //file.PrintKeys();
7
8 Double_t time;
9 Float_t dust;
10 file.SetPtrAddress("Time", &time);
11 file.SetPtrAddress("Dust", &dust);
12
13 UInt_t offset = file.GetUInt("MJDREF");
14 if (beg < 30000)
15 beg+=offset;
16 if (end < 30000)
17 end+=offset;
18
19 TGraph g;
20 while (file.GetNextRow())
21 g.SetPoint(g.GetN(), time+offset, dust);
22
23 cout << "result " << MSpline3(g).Eval((beg+end)/2) << endl;
24}
Note: See TracBrowser for help on using the repository browser.