cinemascience / pycinema

cinema engine toolkit
Other
1 stars 4 forks source link

CinemaDatabaseReader does not recognize 'file_column' parameter values with upper case letters #29

Closed dhrogers closed 12 months ago

dhrogers commented 1 year ago

Cinema databases created by Paraview have a 'file_column' value of 'FILE_png', instead of 'file'. I was unable to load one of these databases, even after changing the filecolumn paramter.

Steps:

  1. Get the current viewer test databases: git clone git@github.com:cinemascience/cinema_viewers.git
  2. run 'designer', and create a 'CinemaDatabaseReader' filter
  3. change the path to load the 'cinema_viewers/data/test_paraview.cdb' database
  4. filter reports '[ERROR] file column not found: file'
  5. change the file_column parameter to be 'FILE_png', which is what is in the database
  6. filter reports '[ERROR] file column not found: FILE_png'

Note that if you change the database by editing the 'data.csv' file to have 'file_png' instead of 'FILE_png' as the file_column value, the database will load normally.

The code for the CinemaDatabaseReader explicitly changes column headers to lowercase, so this behavior is understandable from the code. I'm not certain why the column headers are changed to lower, but eliminating this step will fix the issue.

Question: why is the lower case conversion enforced?