Skip to content
Snippets Groups Projects

replace glue.ligolw with python-ligo-lw; fixes #18

Closed Deep Chatterjee requested to merge fix-ligolw into master
2 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • Doing the import replacement is leading to a few tests failing.

      E     ligo.lw.ligolw.ElementError: line 5: invalid Column 'coinc_event_id' for Table 'coinc_inspiral'

      For test data that has

      	<Table Name="coinc_inspiral:table">
      		<Column Name="coinc_inspiral:coinc_event_id" Type="ilwd:char"/>
      		<Column Name="coinc_inspiral:combined_far" Type="real_8"/>
      		<Column Name="coinc_inspiral:end_time" Type="int_4s"/>
      		<Column Name="coinc_inspiral:end_time_ns" Type="int_4s"/>
      		<Column Name="coinc_inspiral:false_alarm_rate" Type="real_8"/>
      		<Column Name="coinc_inspiral:ifos" Type="lstring"/>
      		<Column Name="coinc_inspiral:mass" Type="real_8"/>
      		<Column Name="coinc_inspiral:mchirp" Type="real_8"/>
      		<Column Name="coinc_inspiral:minimum_duration" Type="real_8"/>
      		<Column Name="coinc_inspiral:snr" Type="real_8"/>
      		<Stream Delimiter="," Name="coinc_inspiral:table" Type="Local">
      			"coinc_event:coinc_event_id:952893",1.828671888312737e-07,1174052512,718443512,0.09620388333783024,"H1,L1",3.781867742538452,1.417048811912537,34387535.28155661,10.47153907920779
      		</Stream>
      	</Table>

      Is there a change in format in ligolw @duncanmmacleod

    • Yes, the *_id tables are now prefixed with their 'source' table (unsure if that's the right nomenclature), so here the translation is coinc_inspiral:coinc_event_id :arrow_right: coinc_event:coinc_event_id. If in doubt, see the definitions in ligo.lw.lsctables, e.g. here.

    • Please register or sign in to reply
  • added 1 commit

    • d9931474 - attempt to rewrite tables using gwpy

    Compare with previous version

    • I made an attempt to rewrite the test data tables by reading in with gwpy ilwdchar_compat=True and writing it out as with format='ligolw' but that does not work either.

    • I saw your comment above. I could try doing the string replacements, but I was wondering if there's a tool that loads lsctables in older format and outputs in new format? I tried using the gwpy tables tools (since I saw a ilwdchar_compat).

    • Sorry @deep.chatterjee, I missed this until now (in future if you include @duncanmmacleod in the comment I will get a to-do list item).

      You should probably use ligolw_no_ilwdchar from python-ligo-lw itself.

    • Please register or sign in to reply
  • closing in favor of !41 (merged)

Please register or sign in to reply
Loading