Closed bdorney closed 6 years ago
I have assigned this task to the PFA team this morning.
To have a more sophisticated algorithm you could convert the scandate
into a datetime
object. The documentation for the datetime
class can be found here.
And an example is given:
import datetime
startDay = datetime.date(datetime.MINYEAR,1,1)
if startDate is not None:
startDateInfo = [ int(info) for info in startDate.split(".") ]
startDay = datetime.date(startDateInfo[0], startDateInfo[1], startDateInfo[2])
pass
endDay = datetime.date.today()
if endDate is not None:
endDateInfo = [ int(info) for info in endDate.split(".") ]
endDat = datetime.date(endDateInfo[0], endDateInfo[1], endDateInfo[2])
pass
And then you can have logical comparisons on datetime objects (e.g. the <
and >
symbols will evaluate whether dateime X was before or after Y):
if (startDay < thisDay and thisDay <= endDay):
listOfScanDatesFile.write('%s%s%s\n'%(chamberName,delim,scandate))
Addressed by #112
Brief summary of issue
We have 30720 channels in CMS presently. And we need some automated way for tracking when changes occur. Ideally this should be via the DB but this is not up and running (yet...). But we have an automated procedure to make time series plots from the entire calibration dataset, see #87.
So my proposal is to use these time series plots to identify:
maskReason
that is applied to a channel,2017.05.10.20.41
to2017.05.31.09.21
.Issue with Channel Mask
Right now when a channel is masked it's
maskReason
will be recorded in the outputTTree
of the analysis scan. However once a channel is masked the history will be somewhat "lost." This is because the channel will be masked at the time of acquisition so the s-curve analysis will see that a fit to it fails (because there is no data). ThemaskReason
will then be assigned FitFailed. This is because the scan software does not know the history.Types of issue
Expected Behavior
To accomplish this a secondary analysis tool should be made,
macros/timeHistoryAnalyzer.py
, which should should have a function like:Caveats is that this needs to be modified to not be sensitive to transient effects; e.g. in this example two scans failed to complete successfully so the data is missing and the channels and this may throw off the algorithm if this were "maskReason" case. Testing would be required
Current Behavior
Presently the last good scandate and first date after burned channel need to be determined by hand. Also the
FitFailed
maskReason
slowly dominates the dataset.Context (for feature requests)
We need to be able to accurately report our channel status and history to ourselves and CMS