The changes are: (1) handle "ivm" and "ivm-sky" cases identically: for "ivm", calculate 1/var_rnoise, setting non-finite to 0, and if missing or shape mismatch, return all ones (equal weighting); for "ivm-sky", calculate 1/var_sky, setting non-finite to 0, and if missing or shape mismatch, return all ones (equal weighting); (2) always multiply the result by the DQ mask; (3) the fallback for a missing variance array is an array filled with ones (equal weighting).
