Skip to content

Erna is producing redundant queries #71

@jebuss

Description

@jebuss

With the new fact_conditions package the options

@click.argument('earliest_night')
@click.argument('latest_night' )

and

@click.option('--source', help='Name of the source to analyze. e.g Crab', default='Crab')

are at least redundant, because with a conditions file containing fSourceName and cuts on fNight you could end up with a query like this.

Querying data with conditions: 
fNight >= 20150901 AND 
fNight <= 20160401 AND 
fSourceName = "Crab" AND 
fCurrentsMedMeanBeg < 8 AND fMoonZenithDistance > 100 AND 
fThresholdMinSet < 350 AND fEffectiveOn > 0.95 AND 
fTriggerRateMedian > 40 AND fTriggerRateMedian < 85 AND 
fThresholdMinSet < (14 * fCurrentsMedMeanBeg + 265) AND 
fZenithDistanceMean < 30.5 AND fZenithDistanceMean > 5.5 AND 
fNight >= 20150901 AND 
fNight <= 20160401 AND 
fSourceName = 'Crab'

In some case this might be just redundant. In other cases this might cause contradicting queries and failures is processing that are not easy to debug.

Thus, i'd like to raise the question it we would like to get rid of:

@click.argument('earliest_night')
@click.argument('latest_night' )

and

@click.option('--source', help='Name of the source to analyze. e.g Crab', default='Crab')

in:
https://github.com/fact-project/erna/blob/master/erna/scripts/process_fact_data.py
https://github.com/fact-project/erna/blob/master/erna/scripts/process_fact_data_qsub.py
https://github.com/fact-project/erna/blob/master/erna/scripts/fetch_fact_runs.py

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions