qavrg 0.0.28
|
00001 #ifndef TODO_H 00002 #define TODO_H 00003 00004 //--------------------------------- 00005 // 00006 //After dark or reference acquire, can't do another acquire 00007 // 00008 //Was deadlock problem - changed to recursive ReadWrite lock 00009 // 00010 //-------------------------------- 00011 // 00012 //Enter QavrgAcquisition::initialize()loadReferenceData from /home/jennings/.qavrg/ref0 00013 //QObject: Cannot create children for a parent that is in a different thread. 00014 //(Parent is QavrgScriptingEngine(0x8caaf78), parent's thread is QavrgScriptingThread(0x8c3cf60), current thread is QThread(0x8af88a0) 00015 //Leave QavrgAcquisition::initialize()QavrgSpecServer:: QavrgSpecServer::QavrgSpecServer 00016 // 00017 //Was problem with parent argument to QavrgServerThread 00018 // 00019 //-------------------------------- 00020 // 00021 //Updating the graph frequently doesn't happen when it should 00022 //Should work now... 00023 // 00024 //-------------------------------- 00025 // 00026 //Want to remove 'preferences' dialog 00027 // 00028 //-------------------------------- 00029 // 00030 //Display settings aren't saved 00031 // 00032 //-------------------------------- 00033 // 00034 //Data don't scale correctly in simulated acquisition mode 00035 // 00036 //-------------------------------- 00037 // 00038 //Fitting results don't update during scope mode acquisition 00039 //QavrgResultsModel::resultsChanged() is emitted lots of times when acquisition ends. 00040 // 00041 // Problem was that waveforms were calculated by a QtConcurrent::run using a thread-safe 00042 // random number generator. The waveforms would only change when a new thread from 00043 // the thread pool was used. 00044 // 00045 //-------------------------------- 00046 // 00047 //Remove QavrgAcquisition::totalChannels() 00048 // 00049 //-------------------------------- 00050 // 00051 //Resolve changes in QSpecServer 00052 //Needs to be checked that it still works... 00053 // 00054 //-------------------------------- 00055 // 00056 //Check that calculations are actually performed concurrently where possible - doesn't seem to be 00057 //happening at the moment. 00058 //The fitters read data from the acquisition object many times during execution, leading to extensive 00059 //locking which stops the fitter threads from running in parallel. 00060 // 00061 //-------------------------------- 00062 // 00063 //If you try to zoom the graph during scope mode, there is some kind of deadlock. 00064 //(Only in real acquisition mode, it seems); 00065 // 00066 //-------------------------------- 00067 // 00068 //Change QReadWriteLock to QMutex 00069 // 00070 //-------------------------------- 00071 // 00072 //Change the fitted results table display: 00073 //Display the peak height fits first 00074 //Change the row number display to show the orbit and bunch number 00075 // 00076 //-------------------------------- 00077 // 00078 //Change the main display bunch number to mean the filled bunch, rather than the bucket position. 00079 // 00080 //-------------------------------- 00081 // 00082 //Calculate and display fitted data in main graph 00083 // 00084 //-------------------------------- 00085 // 00086 //Adopt consistent channel numbering for human-visible purposes: 00087 // 00088 //-------------------------------- 00089 // 00090 //Need to re-implement script "savedata" command, reduce number of columns 00091 // 00092 // Re-implemented, only save peak height 00093 // 00094 -------------------------------- 00095 00096 Make THREAD_CHECK macro failure non-fatal, just print an error 00097 00098 -------------------------------- 00099 00100 Provide some way of resetting the display and/or properties back to sane 00101 default values. 00102 00103 -------------------------------- 00104 00105 Change 'Result' terminology to 'FittingResult' 00106 00107 -------------------------------- 00108 00109 Adopt consistent naming for set_ / get_ vs read / write and load / save 00110 set/get for in-memory properties 00111 read/write for files 00112 load/save for file dialog user interface 00113 00114 //-------------------------------- 00115 // 00116 //Perform acquisition accumulation into internal variables, copy results into 00117 //visible variables and emit signals when completed. 00118 // 00119 //-------------------------------- 00120 // 00121 //Add some zooming controls to the graphs 00122 // 00123 //-------------------------------- 00124 // 00125 //Acquire Dark and Reference to put results directly into appropriate buffer without affecting 00126 //raw data buffer. 00127 // 00128 //-------------------------------- 00129 // 00130 //Added RCS ident strings to all files, and moved RCS log comments to bottom of files 00131 // 00132 //-------------------------------- 00133 // 00134 //If the graph takes too long to update in scope mode the application will get stuck... 00135 //Added a counter to keep track of outstanding updates and skip all except the last. 00136 //Changed the acquisition wait loops to wait in chunks of 0.1 sec, to allow more 00137 //responsive cancellation. 00138 // 00139 -------------------------------- 00140 00141 Need to check that the actual acquisition behaves in much the same way as the simulated 00142 00143 -------------------------------- 00144 00145 Need to check that the remote control interface works as expected 00146 00147 -------------------------------- 00148 00149 Need to check file output routines 00150 00151 //-------------------------------- 00152 // 00153 //Implement 'status' scripting function. With no arguments returns instantaneous 00154 //acquisition status, with an argument waits for up to that time for acquisition 00155 //to complete then returns acquisition status 00156 // 00157 //-------------------------------- 00158 // 00159 //Check 'isStored' when loading back property values 00160 //Consolidate 'loadSettings' and 'saveSettings' routines in one place (static QavrgProperty ?) 00161 //Allow settings to loaded and saved to user-chosen files as well 00162 // 00163 //-------------------------------- 00164 // 00165 //Check fill pattern handling 00166 // 00167 -------------------------------- 00168 00169 Improve error checking and handling in scripting interface. 00170 //Make sure acquisitions don't get queued up. 00171 00172 //-------------------------------- 00173 // 00174 //First acquisition run when number of samples and channels reduced outputs wrong numbers of 00175 //columns. 00176 // 00177 -------------------------------- 00178 00179 Initialization of fitter object depends on acquisition parameters which have not been 00180 read from settings at the time the fitter object is constructed. 00181 00182 //-------------------------------- 00183 // 00184 //Add user interface for setting number of samples and number of channels, including an easy 00185 //way to reset them to default values. 00186 // 00187 -------------------------------- 00188 00189 Handle acquisition timeouts better. 00190 00191 //-------------------------------- 00192 // 00193 //Acquisition status should be changed when the acquireXXX functions are called, not when the event loop 00194 //executes. 00195 // 00196 00197 //-------------------------------- 00198 // 00199 //Allow script execution to be interrupted 00200 // 00201 //-------------------------------- 00202 // 00203 //Can't cancel acquisition any more. Data acquisition also never terminates, though dark and reference 00204 //acquisition will finish eventually. 00205 // 00206 //Actually a size problem if nsamples was changed between dark/reference acquisition and data acquisition. 00207 //Fitting routines crash in this case. 00208 //Fixed. 00209 // 00210 //-------------------------------- 00211 // 00212 //Acquisition repetitions after first are not handled properly 00213 //Was bracket nesting problem in QavrgAcquisition::startAcquisition where the acquisition 00214 //starting code was in the same block as the accumulator initialization code 00215 // 00216 -------------------------------- 00217 00218 Consider moving data storage for each channel into the fitter object. 00219 00220 -------------------------------- 00221 00222 Remote control interface still converts array return values into strings 00223 i.e. remote_eval(HOST, "Array(2,3,4)") 00224 returns the string "2,3,4" to spec 00225 00226 //-------------------------------- 00227 // 00228 //Move QavrgProperty into qceplib 00229 // 00230 //-------------------------------- 00231 // 00232 //Evaluate whether the simple expedient of using Qt::DirectConnection links between widgets 00233 //and properties will work on all supported platforms. It appears to be a simple way 00234 //of avoiding the multiple queued updates problem that we are experiencing at present. 00235 //Doesn't work, unfortunately. 00236 // Have eventually found a solution by adding a data member to the property classes which 00237 // counts the number of outstanding updtae events that it has received. When multiple 00238 // updates are outstanding, only propagate the last. 00239 // 00240 //-------------------------------- 00241 // 00242 //When running the tests in spectest.mac, there is an error message 00243 //QMetaMethod::invoke: Unable to handle unregistered datatype 'QVector<QString>' 00244 //Got acquisition lock 00245 // 00246 //-------------------------------- 00247 // 00248 //Save the path to the spec data file (set by newFile scripting function) and the number of columns 00249 //to allow scans to resume if qavrg crashes; 00250 // 00251 //-------------------------------- 00252 // 00253 //The 'fit' curve displayed varies wildly when the reference curve is very similar to the dark and data 00254 //(in other words when there are no X-rays). This may mean that the fitting algorithm is not working properly 00255 //and should be investigated. It might possibly account for the 'offset' problems we were ssing when making 00256 //actual measurements. The effect is also visible in simulation mode. 00257 // 00258 //Had forgotten to subtract dark data when calculating fit data 00259 // 00260 //-------------------------------- 00261 // 00262 //There is clearly still a crashing problem when taking data. I am accumulating crash dumps in the hope 00263 //of finding out what is going on. It would be valuable to see if the problem is also present in simulation 00264 //mode. 00265 //At least at first glance, it would seem that the problem is in the real acquisition mode, and doesn't affect 00266 //simulation mode. 00267 //Not the case - seems to be caused by a general lack of locking in the acquire classes when they are accessing their data. 00268 //I've added many more locked sections, hopefully this will fix the crashing. The extra locking makes it harder for 00269 //the fitters to run concurrently - it would definitely better for each fitter channel to have it's own data. 00270 // 00271 //-------------------------------- 00272 // 00273 //Should check the 'parameters adapted' error returns from the acqiris library and see if any of these might 00274 //account for the crashing problem above. In any case, it would be desirable to handle them gracefully. 00275 //Probably not the problem - see above. 00276 // 00277 //-------------------------------- 00278 // 00279 //Check handling of spec scan numbers - are they set anywhere 00280 //The saved file name, scan number and file path should be made properties and replace the fileIndex, 00281 //filePattern etc. properties which are currently unused. 00282 // 00283 //-------------------------------- 00284 // 00285 //Deadlock when: 00286 //QavrgResultsModel::data:54 reads from QavrgAcquisition::readResult:638 reads from QavrgFitter::readResult:71 00287 //while 00288 //QavrgAcquisitionSimulated::calculateSimulatedAcquisition:217 waiting for fitters to complete 00289 //and 00290 //QavrgFitter::performCalculation:302 calls QavrgAcquisitionData:set_FitData:211 00291 // 00292 //Need to go through the acquisition classes more carefully and eliminate unneccesary locks. 00293 // 00294 //-------------------------------- 00295 // 00296 //Use orbit/bunch notation for column names in saved files 00297 // 00298 -------------------------------- 00299 00300 Optimize graph update by suppressing updates until all curves are updated. 00301 Try to get time for display of all data below 0.5 secs 00302 00303 -------------------------------- 00304 00305 Bunch number choice control in 'view' panel doesn't work properly. 00306 00307 -------------------------------- 00308 00309 Provide a way for the newFile command to strip off any directory components of 00310 the path that it is passed (if it is an absolute path) 00311 00312 -------------------------------- 00313 00314 Provide a 'Save Default Settings' command 00315 00316 -------------------------------- 00317 00318 During scanning, it is confusing that the fitted data curves are drawn after the fitting is complete, whereas 00319 the acquired data curves are drawn sooner. This gives a misleading impression that the fit doens't match 00320 up to the data. 00321 00322 -------------------------------- 00323 00324 Fitting is still rather slow 00325 00326 -------------------------------- 00327 00328 Scope mode can too easily overwhelm the GUI with update events. 00329 00330 -------------------------------- 00331 00332 Make acquireDark & acquireRef harder to do accidentally. 00333 00334 -------------------------------- 00335 00336 Crashes if acquisition.channels = 2 ? 00337 00338 //-------------------------------- 00339 // 00340 //Changing number of bunches in N-bunch mode requires restart to take effect 00341 // 00342 -------------------------------- 00343 00344 #endif // TODO_H