public static HashMap<String, Integer> rankFromStdDev(HashMap<String, Double> stdevs) {
        if (stdevs == null || stdevs.size() < 2) return null;
        
		int numColors = TextureHeatMap.MAX_TEXTURES-1;
        // accounts for rounding operation
        double scale = numColors / HeaderLabel.DISAGREE_MAX * 100;
        HashMap<String, Integer> rankVarWeight = new HashMap<String, Integer>();
        for (Map.Entry<String, Double> sd : stdevs.entrySet()) {
            int rank = numColors - (int) Math.floor((sd.getValue()) * scale);
            if (rank < 0) rank = 0;
            if (HeaderLabel.SHOW_TEXTURE)
                rankVarWeight.put(sd.getKey(), rank);
            else
                rankVarWeight.put(sd.getKey(), (int)Math.round(sd.getValue()*100));
        }
        
        return rankVarWeight;
    }