Giter Club home page Giter Club logo

a2p2's People

Contributors

bourgesl avatar gillesduvert avatar gmella avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

a2p2's Issues

P104 update requested

At present time, P2 complains about requests provided by a2p2 (using PIONIER at least).

I will try to see if we can get more information by the programs. The p2api returns following error:
"JSON is missing required fields or contains extra ones."

Xavier, may scientists have a look on required dictionary updates in the a2p2 json files ?

Let's continue to fix such blocking issues some days before the 1august deadline !-)

Improve and correct the action when submitted OB does not match the instrument template

Description

Currently, when one OB is submitted through aspro2 to Aspro with a parameter that does not match the instrument template requirement the user gets the following pop-up error message (example)

Value error :
K mag (2.310000) is out of ranges [2.500000,11.000000]
for this mode (tel=AT, spec=LOW, pol=OUT, dualFeed=False)
Aborting submission to P2. Please check LOG and fix before new submission.

This leads of all the OB submission process to be aborted by a2p2.

Desirable evolution

Improve the message

In order for the user to understand the message it should be modified as follows

Add
"WARNING: According to the template manual (Number P109b (provide most recent version))"
K mag (2.310000) is out of ranges [2.500000,11.000000] (replace ranges by range)
Add for target xxx (provide the target name corresponding to the incorrect OB)

Enable submission anyways

Such errors should not prevent the user to submit their OBs to P2. It is their responsibility to correct it.
So the a2p2 process should not be aborted and the "OK" button could be replaced by a simple "Proceed" button that will allow the submission.

Improve AO support

Aspro2 allows AO selection (NAOMI modes, MACAO or CIAO modes) that remains to be supported by A2P2 (and P2 ?)

TypeError: 'NoneType' object is not iterable

aspro2 21.10 beta 7 + a2p2 v.0.3.7 :
sendind an object (gravity or matisse or pionier all the same), gives:

Traceback (most recent call last):
  File "/home/gildas/.local/lib/python3.7/site-packages/a2p2/vlti/facility.py", line 104, in processOB
    instrument.checkOB(ob)
  File "/home/gildas/.local/lib/python3.7/site-packages/a2p2/vlti/gravity.py", line 89, in checkOB
    self.checkIssVltiType(acqTSF)
  File "/home/gildas/.local/lib/python3.7/site-packages/a2p2/vlti/instrument.py", line 137, in checkIssVltiType
    vltitypePref=[v for v in self.facility.a2p2client.preferences.getConfigKeys(psection) if self.isInRange(acqTSF.tpl, "ISS.VLTITYPE", v) ]
TypeError: 'NoneType' object is not iterable

comes from line 137 in instrument.py where vltitypePref is not correctly initialized, setting
vltitypePref=['snapshot']
instead at this line saves the day.

IMHO this comes from vltitypePref not present in the xml sent by Aspro, but 21.10 beta 7 is the last availble Aspro distro.
Probably cannot harm if vltitypePref was set to ['snapshot'] when it is not present in the Aspro SAMP message.

Can't log in

This very useful tool has never worked for me. I just tried again but I can't log in the ESO portal. It stays stuck with:

`
INFO - a2p2.gui - 2022-07-12 13:20:46,165 - gui.py:180 - Sorry, your PIONIER OB can't be submitted, please log in first, select container and send OB again from Aspro2.'

'INFO - a2p2.vlti.facility - 2022-07-12 13:21:07,264 - facility.py:170 - Connecting to p2 api...'

'INFO - a2p2.gui - 2022-07-12 13:21:08,635 - gui.py:180 - Connected to p2 api (production)`

I am on MacOs 12.2 and Python 3.8.13

Removing the * in the name of stars from Simbad

When obtained from Simbad or SearchCal, some star names start with the * character. P2 rejects this.

I added obTarget.name = obTarget.name.replace('*', '') after lines 69-70 in vlti/pionier.py

I suppose the same line should be added for GRAVITY and MATISSE. I tested for PIONIER only, it works.

Cheers.

Miguel

Dual field issue?

Using S Cra B as AO and FT for s C Cra A (1.12 second) distance.

Error :
Traceback (most recent call last):
File "/home/gildas/miniconda3/lib/python3.6/site-packages/a2p2/vlti/facility.py", line 97, in processOB
instrument.submitOB(ob, self.containerInfo)
p2api.P2Error: (400, 'PUT', 'https://www.eso.org/cop/api/v1/obsBlocks/2454075/templates/1672755', 'The value 0.0 entered for parameter SEQ.RELOFF.X is invalid. Expecting a value of type numlist')

Please check LOG and fix before new submission.
Traceback (most recent call last):
File "/home/gildas/miniconda3/lib/python3.6/site-packages/a2p2/vlti/facility.py", line 97, in processOB
instrument.submitOB(ob, self.containerInfo)
File "/home/gildas/miniconda3/lib/python3.6/site-packages/a2p2/vlti/gravity.py", line 247, in submitOB
self.checkOB(ob, p2container, False)
File "/home/gildas/miniconda3/lib/python3.6/site-packages/a2p2/vlti/gravity.py", line 239, in checkOB
DIAMETER, COU_AG_GSSOURCE, GSRA, GSDEC, COU_GS_MAG, dualField, dualFieldDistance, SEQ_FT_ROBJ_NAME, SEQ_FT_ROBJ_MAG, SEQ_FT_ROBJ_DIAMETER, SEQ_FT_ROBJ_VIS, LSTINTERVAL)
File "/home/gildas/miniconda3/lib/python3.6/site-packages/a2p2/vlti/gravity.py", line 393, in createGravityOB
tpl, tplVersion = api.setTemplateParams(obId, tpl, values, tplVersion)
File "/home/gildas/miniconda3/lib/python3.6/site-packages/p2api-0.91-py3.6.egg/p2api.py", line 861, in setTemplateParams
return self.saveTemplate(obId, template, version)
File "/home/gildas/miniconda3/lib/python3.6/site-packages/p2api-0.91-py3.6.egg/p2api.py", line 887, in saveTemplate
return self.put('/obsBlocks/%d/templates/%d' % (obId, template['templateId']), template, etag=version)
File "/home/gildas/miniconda3/lib/python3.6/site-packages/p2api-0.91-py3.6.egg/p2api.py", line 1313, in put
return self.request('PUT', url, data, etag)
File "/home/gildas/miniconda3/lib/python3.6/site-packages/p2api-0.91-py3.6.egg/p2api.py", line 1259, in request
raise P2Error(r.status_code, method, url, r.json()['error'])
p2api.P2Error: (400, 'PUT', 'https://www.eso.org/cop/api/v1/obsBlocks/2454075/templates/1672755', 'The value 0.0 entered for parameter SEQ.RELOFF.X is invalid. Expecting a value of type numlist')

Not finding the right container id?

Hi all,

I am trying to use a2p2 to put MATISSE OBs into p2 but I get the following error message:
In P2 my container ID is 2658970 whereas a2p2 looks for 105051700.

Could you please check it? (or did I do something wrong?)
Thanks!

Jacques

General error or Absent Parameter in template!
Missing magnitude or OB not set ?

Error :
Traceback (most recent call last):
File "/anaconda3/lib/python3.6/site-packages/a2p2/vlti/facility.py", line 95, in processOB
instrument.submitOB(ob, self.containerInfo)
p2api.p2api.P2Error: (404, 'POST', 'https://www.eso.org/cop/api/v1/containers/105051700/items', "No container with id '105051700'.")

Please check LOG and fix before new submission.

Traceback (most recent call last):
File "/anaconda3/lib/python3.6/site-packages/a2p2/vlti/facility.py", line 95, in processOB
instrument.submitOB(ob, self.containerInfo)
File "/anaconda3/lib/python3.6/site-packages/a2p2/vlti/instrument.py", line 54, in submitOB
folder, _ = api.createConcatenation(p2container.containerId, folderName)
File "/anaconda3/lib/python3.6/site-packages/p2api/p2api.py", line 320, in createConcatenation
return self.createItem('Concatenation', containerId, name)
File "/anaconda3/lib/python3.6/site-packages/p2api/p2api.py", line 260, in createItem
return self.post('/containers/%d/items' % containerId, {'itemType': itemType, 'name': name})
File "/anaconda3/lib/python3.6/site-packages/p2api/p2api.py", line 1466, in post
return self.request('POST', url, data, etag)
File "/anaconda3/lib/python3.6/site-packages/p2api/p2api.py", line 1409, in request
raise P2Error(r.status_code, method, url, r.json()['error'])
p2api.p2api.P2Error: (404, 'POST', 'https://www.eso.org/cop/api/v1/containers/105051700/items', "No container with id '105051700'.")

password is visible

the password for account is visible, and since it takes 1 full minute to connect to P2, this is a bit annoying...

A2P2 error at startup (python2.7)

bourgesl@bourgesl-HP-ZBook-15-G3:~/dev/a2p2$ a2p2
Traceback (most recent call last):
File "/usr/local/bin/a2p2", line 19, in main
with A2p2Client(args.fakeapi) as a2p2c:
File "/home/bourgesl/.local/lib/python2.7/site-packages/a2p2/client.py", line 34, in init
self.facilityManager = FacilityManager(self)
File "/home/bourgesl/.local/lib/python2.7/site-packages/a2p2/facility.py", line 23, in init
self.registerFacility(VltiFacility(self.a2p2client))
File "/home/bourgesl/.local/lib/python2.7/site-packages/a2p2/vlti/facility.py", line 53, in init
from a2p2.vlti.gravity import Gravity
File "/home/bourgesl/.local/lib/python2.7/site-packages/a2p2/vlti/gravity.py", line 7, in
from a2p2.vlti.instrument import VltiInstrument
File "/home/bourgesl/.local/lib/python2.7/site-packages/a2p2/vlti/instrument.py", line 253
return s
^
IndentationError: expected an indented block

Support mulitple queueserver URLs

main values can be defined in the preference file using existing queueserver, eg.:

queueserver = http://localhost:2468/test
queueserver = http://host1:2469/test, http://host2:2468/test,http://localhost:2468/test

the GUI may propose to select one or more to test and a field to enter a new value.

Impossible to send SCI targets

Hello,

I have a visitor run soon and I am trying to send VLTI/PIONIER OBs from Aspro, but it does not work for the SCI targets, while it works for the CALs. I have a popup error window (see attached screenshot), and the following messages in the LOG:

Info message
General error or Absent Parameter in template!
Missing magnitude or OB not set ?

Error :
Traceback (most recent call last):
File "/Users/agallenn/anaconda3/lib/python3.6/site-packages/a2p2/vlti/facility.py", line 97, in processOB
instrument.submitOB(ob, self.containerInfo)
AttributeError: 'observationConfiguration' object has no attribute 'Target'

Please check LOG and fix before new submission.
Traceback (most recent call last):
File "/Users/agallenn/anaconda3/lib/python3.6/site-packages/a2p2/vlti/facility.py", line 97, in processOB
instrument.submitOB(ob, self.containerInfo)
File "/Users/agallenn/anaconda3/lib/python3.6/site-packages/a2p2/vlti/pionier.py", line 185, in submitOB
self.checkOB(ob, p2container, False)
File "/Users/agallenn/anaconda3/lib/python3.6/site-packages/a2p2/vlti/pionier.py", line 56, in checkOB
folderName = obsconflist[0].Target.name
AttributeError: 'observationConfiguration' object has no attribute 'Target'

I am using a Mac OS 10.12.6 and python 3 from anaconda

Capture d’écran 2019-05-15 à 17.39.59.pdf

process as many calibrators as needed

In ASPRO, one can link more than one calibrator to a star. When at least a pair object+calibrator is defined, a2p2 opens a folder on P2 with the name of th escience object. The folder contains the PB for the science object and the calibrator.
A2P2 should create in this folder all the calibrator's OBS, not the 1st one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.