[INSTRM-1618] update opdb schema to cope with the new pfsDesign finalize logic Created: 02/Jun/22  Updated: 01/Sep/22  Resolved: 01/Sep/22

Status: Won't Fix
Project: Instrument control development
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: arnaud.lefur Assignee: Kiyoto Yabe
Resolution: Won't Fix Votes: 0
Labels: EngRun
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to INSTRM-1569 Have ICC "finalize" pfsDesign on load. Won't Fix
relates to INSTRM-1577 Verify the mechanism to store pfsDesi... Done
relates to INSTRM-1609 Calculate fibre positions in mm just ... Done
relates to INSTRM-1570 Provide pfs_utils routine to finalize... Won't Fix
Sprint: PreEngRun06June, preEngRun07Sep

 Description   

So, some book-keeping details needs to be settled regarding our new pfsDesign finalize logic :

We'll have 4 new columns :

  • target_ra_final (proper motion tweaking)
  • target_dec_final (proper motion tweaking)
  • pfi_final_x_mm (proper motion + airmass)
  • pfi_final_y_mm (proper motion + airmass)

to track them, we (probably) need to change opdb schema.

so right now when IIC declareCurrentPfsDesign is called, IIC load the design and insert the "raw" design into those tables (pfs_design, pfs_design_fiber and pfs_design_agc, thanks Kiyoto Yabe).

we need a place to store those new information and one could argue that pfs_design_fiber has similar columns:

  • target_ra
  • target_dec
  • pfi_nominal_x_mm
  • pfi_nominal_y_mm

But we think with cloomis that we should keep the "raw designed" values and adding new columns there is not an option.

There is also the pfs_config_fiber table but it's only written after a convergence.
But we strongly think that you always want to write those designed values before you converge.

One solution would be to add a new table, something like :
pfs_design_fiber_final:

  • pfs_design_id
  • fiber_id
  • target_ra_final
  • target_dec_final
  • pfi_final_x_mm
  • pfi_final_y_mm

Which get written, when the tweaking is done, before starting the convergence.
Any idea, objections ? rhl



 Comments   
Comment by Kiyoto Yabe [ 03/Jun/22 ]

That sounds reasonable and easy to me.

Comment by Kiyoto Yabe [ 06/Jun/22 ]

Just added the following table:

class pfs_design_fiber_final(Base):
    '''Pre-operations information for each fiber (just before the cobra configuration).
    '''
    __tablename__ = 'pfs_design_fiber_final'
    __table_args__ = (UniqueConstraint('pfs_design_id', 'fiber_id'),
                      ForeignKeyConstraint(['pfs_design_id', 'fiber_id'],
                                           ['pfs_design_fiber.pfs_design_id', 'pfs_design_fiber.fiber_id']),
                      {})

    pfs_design_id = Column(BigInteger, primary_key=True, autoincrement=False)
    fiber_id = Column(Integer, primary_key=True, autoincrement=False)
    target_final_ra = Column(FLOAT, comment='Final R.A. of the target at the observing time')
    target_final_dec = Column(FLOAT, comment='Final Dec. of the target at the observing time')
    pfi_final_x_mm = Column(REAL, comment='Final designed x-position on the PFI [mm]')
    pfi_final_y_mm = Column(REAL, comment='Final designed y-position on the PFI [mm]'

 

Comment by Kiyoto Yabe [ 10/Jun/22 ]

I'm just wondering if we need something like the time of the convergence. We probably use the same design at different times. Can we get visitId before populating this table? cloomis arnaud.lefur

 

Comment by hassan [ 09/Jul/22 ]

Has the visitId been accessible Kiyoto Yabe? Can we also close this ticket?

Comment by Kiyoto Yabe [ 09/Jul/22 ]

I think we need to think about the mechanism further with especially cloomis.

Comment by Kiyoto Yabe [ 01/Sep/22 ]

According to discussions in the previous meeting, we don't need an intermediate table to finalize designs. So, can we close this ticket as Won't fix?

Comment by hassan [ 01/Sep/22 ]

Agreed. Marked it as won't fix.

Generated at Sat Feb 10 16:37:37 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.