Fixed J_dir calculation (Jy negative due to image indexing direction), adjusted thresholds, calculate hysteresis with conv2.