modify script to check data

now it can be sourced more easily, provided that data has already been
loaded as `data_horiz`