Skip to content

Commit

Permalink
windows needs __main__ to multiprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
mfitzasp committed Dec 22, 2024
1 parent 3c501c0 commit 1abf758
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 3 deletions.
6 changes: 5 additions & 1 deletion astrosource/analyse.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,4 +810,8 @@ def calibrated_photometry(paths, photometrydata, colourterm, colourerror, colour
logger.info("then consider providing an appropriate colour for this filter using the --targetcolour option")
logger.info("as well as an appropriate colour term for this filter (using --colourdetect or --colourterm).")

return pdata
return pdata

# Needed for windows to multiprocess appropriately
if __name__ == "__main__":
pass
6 changes: 5 additions & 1 deletion astrosource/comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -1941,4 +1941,8 @@ def find_comparisons_calibrated(targets, paths, filterCode, nopanstarrs=False, n
savetxt(parentPath / "results/calibCompsUsed.csv", compFile, delimiter=",", fmt='%0.8f',header='RA,Dec,Variability')
sys.stdout.write('\n')

return colourTerm, colourError, compFile
return colourTerm, colourError, compFile

# Needed for windows to multiprocess appropriately
if __name__ == "__main__":
pass
6 changes: 5 additions & 1 deletion astrosource/identify.py
Original file line number Diff line number Diff line change
Expand Up @@ -1185,4 +1185,8 @@ def find_stars(targets, paths, fileList, nopanstarrs=False, nosdss=False, noskym
f.write(str(filename) +"\n")


return fileList, outputComps, photFileHolder, photCoords
return fileList, outputComps, photFileHolder, photCoords

# Needed for windows to multiprocess appropriately
if __name__ == "__main__":
pass
4 changes: 4 additions & 0 deletions astrosource/periodic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2364,3 +2364,7 @@ def plot_with_period(paths, filterCode, numBins = 10, minperiod=0.2, maxperiod=1
# return pdm["distance_minperiod"]
# else:
return 0.0

# Needed for windows to multiprocess appropriately
if __name__ == "__main__":
pass
4 changes: 4 additions & 0 deletions astrosource/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,3 +373,7 @@ def phased_plots(paths, filterCode, targets, period, phaseShift):


return

# Needed for windows to multiprocess appropriately
if __name__ == "__main__":
pass

0 comments on commit 1abf758

Please sign in to comment.