The filter function code is neat! My suggestion is that you could improve the is_observable function by validating whether the value you read in from the XML file for the declination is indeed a real coordinate within the expected value range, to avoid troubles if your data have NaN values or numeric placeholders for NaNs (-9999 etc).