Skip to content

Commit

Permalink
Print all digits
Browse files Browse the repository at this point in the history
  • Loading branch information
Diego Ristè committed Oct 2, 2019
1 parent b46ecbd commit 1ff55ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions QGL/ChannelLibraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ def ls(self):
def cal_ls(self):
''' List of auspex.pulse_calibration results '''
caldb = bbndb.calibration.Calibration
c = self.session.query(caldb.id, caldb.name, caldb.value, caldb.date).all()
c = self.session.query(caldb.id, caldb.name, caldb.value, caldb.date).order_by(-Channels.ChannelDatabase.id).all()
table_code = ""
for i, (id, sample_id, name, value, time) in enumerate(c):
d,t = str(time).split()
sample = self.session.query(bbndb.calibration.Sample).filter_by(id=sample_id).first()
table_code += f"<tr><td>{id}</td><td>{d}</td><td>{t.split('.')[0]}</td><td>{sample.name}</td><td>{name}</td><td>{round(value,5)}</td></tr>"
table_code += f"<tr><td>{id}</td><td>{d}</td><td>{t.split('.')[0]}</td><td>{sample.name}</td><td>{name}</td><td>{round(value,9)}</td></tr>"
display(HTML(f"<table><tr><th>id</th><th>Date</th><th>Time</th><th>Sample</th><th>Name</th><th>Value</th></tr><tr>{table_code}</tr></table>"))

def ent_by_type(self, obj_type, show=False):
Expand Down

0 comments on commit 1ff55ef

Please sign in to comment.