static IntegralArea* prepareParameters(const SeparationFlags* sf, AstronomyParameters* ap, BackgroundParameters* bgp, Streams* streams) { IntegralArea* ias; ias = setupSeparation(ap, bgp, streams, sf); /* Try the new file first. If that doesn't work, try the old one. */ if (!ias) { mw_printf("Error reading astronomy parameters from file '%s'\n" " Trying old parameters file\n", sf->ap_file); ias = readParameters(sf->ap_file, ap, bgp, streams); } if (!ias) { mw_printf("Failed to read parameters file\n"); return NULL; } if (sf->numArgs && setParameters(ap, bgp, streams, sf->numArgs, sf->nForwardedArgs)) { mwFreeA(ias); freeStreams(streams); return NULL; } return ias; }
static IntegralArea* prepareParameters(const SeparationFlags* sf, AstronomyParameters* ap, BackgroundParameters* bgp, Streams* streams) { IntegralArea* ias; ias = setupSeparation(ap, bgp, streams, sf); /* Try the new file first. If that doesn't work, try the old one. */ if (!ias) { mw_printf("Switching to Parameter File '%s'\n", sf->ap_file); ias = readParameters(sf->ap_file, ap, bgp, streams); } if (!ias) { mw_printf("Failed to read parameters file\n"); return NULL; } return ias; }